changeset 8589:a29b5b5c3c9d libavcodec

Avoid using sub_id in mpeg1/2video.
author michael
date Tue, 13 Jan 2009 21:13:45 +0000
parents 93dbb3999cc8
children 7a463923ecd1
files mpeg12.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Tue Jan 13 19:38:54 2009 +0000
+++ b/mpeg12.c	Tue Jan 13 21:13:45 2009 +0000
@@ -1265,7 +1265,8 @@
          * 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;