summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h264.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 03d70b7d78..64ca5b7e66 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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;
}
}