On Sat, 31 May 2014, Martin Storsjö wrote:
From: Michael Niedermayer <[email protected]>For RTP hinting, the source AVStream should be left untouched, since it corresponds to its own track in the MP4 file. The chained RTP muxer only has got a corresponding MP4 file track, with a separate time base. --- libavformat/movenchint.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c index a8f5f34..496b8c0 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,11 @@ int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index) if (ret < 0) goto fail; + // Restore the time base of the source AVStream - it belongs + // to a different track and should not be updated here (at least + // without updating src_track->timescale as well). + src_st->time_base = src_timebase; + /* Copy the RTP AVStream timebase back to the hint AVStream */ track->timescale = track->rtp_ctx->streams[0]->time_base.den; -- 1.8.5.2 (Apple Git-48)
Or should we just copy the time base manually in rtspenc.c and sapenc.c instead, so we don't need to undo it here?
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
