diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 17:54:02 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 18:08:36 +0400 |
commit | 09450c55092523d073f7ec415f863531838ca908 (patch) | |
tree | 68ae6a041c8bdb68ad5942b3b5f7f0e6bde23d0c /libavcodec/h264_parser.c | |
parent | 620e7f0f3b3dff85d9c49a5c4b8a5df7143af7fe (diff) |
avcodec/h264: fix time_base and framerate
They are not just inverses of each other.
This should restore behavior to before the introduction of framerate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r-- | libavcodec/h264_parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 36cf980c8e..ac4d73a39d 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -490,6 +490,8 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); + if (avctx->framerate.num) + avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); if (h->sei_cpb_removal_delay >= 0) { s->dts_sync_point = h->sei_buffering_period_present; s->dts_ref_dts_delta = h->sei_cpb_removal_delay; |