[FFmpeg-cvslog] r16587 - trunk/libavcodec/mpeg12.c

michael subversion
Tue Jan 13 22:13:45 CET 2009


Author: michael
Date: Tue Jan 13 22:13:45 2009
New Revision: 16587

Log:
Avoid using sub_id in mpeg1/2video.

Modified:
   trunk/libavcodec/mpeg12.c

Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c	Tue Jan 13 22:07:27 2009	(r16586)
+++ trunk/libavcodec/mpeg12.c	Tue Jan 13 22:13:45 2009	(r16587)
@@ -1265,7 +1265,8 @@ static int mpeg_decode_postinit(AVCodecC
          * that behave like P-frames. */
         avctx->has_b_frames = !(s->low_delay);
 
-        if(avctx->sub_id==1){//s->codec_id==avctx->codec_id==CODEC_ID
+        assert((avctx->sub_id==1) == (avctx->codec_id==CODEC_ID_MPEG1VIDEO));
+        if(avctx->codec_id==CODEC_ID_MPEG1VIDEO){
             //MPEG-1 fps
             avctx->time_base.den= ff_frame_rate_tab[s->frame_rate_index].num;
             avctx->time_base.num= ff_frame_rate_tab[s->frame_rate_index].den;




More information about the ffmpeg-cvslog mailing list