summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-09-06 18:10:41 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-07 11:11:56 +0200
commit207d78176f868555ed7b5db4eb6ec9af9d3f700d (patch)
treea6511f7723ad3fd6245c2945d792cf74e47551e2 /libavformat/utils.c
parentba7be8c083dfaaf8d6ba4116af332fb4a08f0f8d (diff)
avformat: Export ticks_per_frame in st->codec
Fixes regressions with stream copy and output timebase/fps being twice as fine as needed Makes the timebase and ticks per frame handled identical which should make the code easier to understand and work with. It does not solve the problem without st->codec access Suggested-by: Hendrik Leppkes Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7d23c4ae47..76cbff4ef6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3825,8 +3825,10 @@ FF_DISABLE_DEPRECATION_WARNINGS
st->codec->height = st->internal->avctx->height;
}
- if (st->codec->codec_tag != MKTAG('t','m','c','d'))
+ if (st->codec->codec_tag != MKTAG('t','m','c','d')) {
st->codec->time_base = st->internal->avctx->time_base;
+ st->codec->ticks_per_frame = st->internal->avctx->ticks_per_frame;
+ }
st->codec->framerate = st->avg_frame_rate;
if (st->internal->avctx->subtitle_header) {