changeset 9058:7c9368905639 libavcodec

Half user provided time_base once during the first frame when there is no timebase stored in the h264 stream. This should fix fate. (ffmpeg.c used pict_repeat with its default 1/25 timebase)
author michael
date Thu, 26 Feb 2009 21:09:24 +0000
parents 0adefec7e2b4
children 3c5920f57063
files h264.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Thu Feb 26 20:36:47 2009 +0000
+++ b/h264.c	Thu Feb 26 21:09:24 2009 +0000
@@ -3768,6 +3768,9 @@
                 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;
         }
     }