]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Half user provided time_base once during the first frame when there is no
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 26 Feb 2009 21:09:24 +0000 (21:09 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 26 Feb 2009 21:09:24 +0000 (21:09 +0000)
timebase stored in the h264 stream.
This should fix fate. (ffmpeg.c used pict_repeat with its default 1/25 timebase)

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17622 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/h264.c

index 03d70b7d789aacf35f4b3589241109afde9fb3d4..64ca5b7e66ad80cbdc8c0890d95e2daacc6fdd4a 100644 (file)
@@ -3768,6 +3768,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
                 s->avctx->time_base.den *= 2;
             av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den,
                       s->avctx->time_base.num, s->avctx->time_base.den, 1<<30);
+        }else if(!h->sps.time_scale && !s->avctx->frame_number){
+            s->avctx->time_base.den *=2;
+            h->sps.time_scale= s->avctx->time_base.den;
         }
     }