--- avcodec_sample.0.4.9.cpp 2005-11-07 16:12:44.000000000 -0500 +++ avcodec_sample.0.4.9-fixed.cpp 2006-02-28 11:45:50.000000000 -0500 @@ -80,7 +80,7 @@ // Find the first video stream videoStream=-1; for(i=0; inb_streams; i++) - if(pFormatCtx->streams[i]->codec.codec_type==CODEC_TYPE_VIDEO) + if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) { videoStream=i; break; @@ -89,7 +89,7 @@ return -1; // Didn't find a video stream // Get a pointer to the codec context for the video stream - pCodecCtx=&pFormatCtx->streams[videoStream]->codec; + pCodecCtx=pFormatCtx->streams[videoStream]->codec; // Find the decoder for the video stream pCodec=avcodec_find_decoder(pCodecCtx->codec_id); @@ -102,8 +102,8 @@ // Hack to correct wrong frame rates that seem to be generated by some // codecs - if(pCodecCtx->frame_rate>1000 && pCodecCtx->frame_rate_base==1) - pCodecCtx->frame_rate_base=1000; + // if(pCodecCtx->frame_rate>1000 && pCodecCtx->frame_rate_base==1) + // pCodecCtx->frame_rate_base=1000; // Allocate video frame pFrame=avcodec_alloc_frame();