aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-30 22:51:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-30 22:52:24 +0200
commit1fe40e1b0538a8eb8425123c47775b5d141ae084 (patch)
treee8bd9f71a6eacee8c9d71a84cb632bf2da3b3764
parent692757062a89c0be5e3da8d55a652339afe679ec (diff)
downloadffmpeg-1fe40e1b0538a8eb8425123c47775b5d141ae084.tar.gz
avformat/movenchint: Fix movhinting with ff_rtp_chain_mux_open() from abb810db036628e11a5171134ebe320b187ee6d6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/movenchint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index 9d6a66e8ce..5f3f7de44b 100644
--- a/libavformat/movenchint.c
+++ b/libavformat/movenchint.c
@@ -33,6 +33,7 @@ int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index)
MOVTrack *src_track = &mov->tracks[src_index];
AVStream *src_st = s->streams[src_index];
int ret = AVERROR(ENOMEM);
+ AVRational src_timebase = src_st->time_base;
track->tag = MKTAG('r','t','p',' ');
track->src_track = src_index;
@@ -48,6 +49,8 @@ int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index)
if (ret < 0)
goto fail;
+ src_st->time_base = src_timebase; // prevent ff_rtp_chain_mux_open() from corrupting the timebase
+
/* Copy the RTP AVStream timebase back to the hint AVStream */
track->timescale = track->rtp_ctx->streams[0]->time_base.den;