Show
Ignore:
Timestamp:
03/23/09 17:45:10 (4 years ago)
Author:
robert
Message:

From Wang Rui, "Attached is a very small fix for the ffmpeg plugin, to build it without compiling errors on MSVC. The ffmpeg win32 pre-built tarball is downloaded at http://ffmpeg.arrozcru.org/builds/. Tested on Windows XP SP3 and Visual Studio 9, but don't know if it still workable for Unix and Mac users. :)


Please look at the .diff files for details. I have already enjoyed the latest Chinese *big* movie "Red Cliff" with the fixed ffmpeg plugin and osgmovie. :D"

Files:
1 modified

Legend:

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

    r9933 r9960  
    234234} 
    235235 
    236 int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, const AVPicture *src, 
     236int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, 
    237237            int src_pix_fmt, int src_width, int src_height) 
    238238{ 
     
    248248 
    249249    osg::notify(osg::INFO)<<"Using sws_scale "; 
    250  
     250     
    251251    int result =  sws_scale(m_swscale_ctx, 
    252                             (const uint8_t**)(src->data), (src->linesize), 0, src_height, 
     252                            (src->data), (src->linesize), 0, src_height, 
    253253                            (dst->data), (dst->linesize)); 
    254254#else 
     
    277277        return; 
    278278         
    279     const AVPicture * const src = (const AVPicture *) m_frame.get(); 
     279    AVPicture * const src = (AVPicture *) m_frame.get(); 
    280280    AVPicture * const dst = (AVPicture *) m_frame_rgba.get(); 
    281281 
     
    313313 
    314314 
    315 void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, const AVPicture * const src, int width, int height) 
     315void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height) 
    316316{ 
    317317    convert(dst, PIX_FMT_RGB32, src, m_context->pix_fmt, width, height);