Changeset 9965

Show
Ignore:
Timestamp:
03/24/09 12:08:40 (6 years ago)
Author:
robert
Message:

From Ulrich Hertlein, "I got the following type error from gcc 4.0.1 on OS X 10.5.6:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function \u2018int osgFFmpeg::FFmpegDecoderVideo::convert(AVPicture*, int, AVPicture*, int, int, int)\u2019:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error: invalid conversion from \u2018int\u2019 to \u2018PixelFormat\u2019
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error: initializing argument 3 of \u2018SwsContext* sws_getContext(int, int, PixelFormat?, int, int, PixelFormat?, int, SwsFilter?*, SwsFilter?*, double*)\u2019

It expects 'src_pix_fmt' and 'dst_pix_fmt' to be of type 'PixelFormat?' rather than int. The attached cast fixes this (for me).

I've also added Matroska video to the list of supported extensions"

Location:
OpenSceneGraph/trunk/src/osgPlugins/ffmpeg
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp

    r9960 r9965  
    241241    if (m_swscale_ctx==0) 
    242242    { 
    243         m_swscale_ctx = sws_getContext(src_width, src_height, src_pix_fmt, 
    244                                       src_width, src_height, dst_pix_fmt,                                     
     243        m_swscale_ctx = sws_getContext(src_width, src_height, (PixelFormat) src_pix_fmt, 
     244                                      src_width, src_height, (PixelFormat) dst_pix_fmt, 
    245245                                      /*SWS_BILINEAR*/ SWS_BICUBIC, NULL, NULL, NULL); 
    246246    } 
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp

    r9885 r9965  
    3737        supportsExtension("mpg", "Mpeg movie format"); 
    3838        supportsExtension("mpv", "Mpeg movie format"); 
    39         supportsExtension("wmv", ""); 
     39        supportsExtension("wmv", "Windows Media Video format"); 
     40        supportsExtension("mkv", "Matroska"); 
    4041 
    4142        // Register all FFmpeg formats/codecs