Module: libav Branch: master Commit: f797b134cad4d248b1c8955659997980d0668bc3
Author: Martin Storsjö <[email protected]> Committer: Martin Storsjö <[email protected]> Date: Sat May 31 01:09:58 2014 +0300 rtpenc_chain: Don't copy the time base to the source stream by default Only copy it manually in the muxers where it makes sense (rtspenc, sapenc). Don't touch the original AVStream in movenchint, where the original AVStream should be kept untouched. This fixes the normal tracks in RTP hinted files after abb810db - the hint tracks were ok while the normal media tracks were broken, noticed by Michael Niedermayer. This reverts abb810db but achieves the same effect for the other muxers. Signed-off-by: Martin Storsjö <[email protected]> --- libavformat/rtpenc_chain.c | 3 --- libavformat/rtsp.c | 1 + libavformat/sapenc.c | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c index 3806254..10c4020 100644 --- a/libavformat/rtpenc_chain.c +++ b/libavformat/rtpenc_chain.c @@ -96,9 +96,6 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, return ret; } - /* Copy the RTP AVStream timebase back to the original AVStream */ - st->time_base = rtpctx->streams[0]->time_base; - *out = rtpctx; return 0; diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index b95be46..06269bd 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -734,6 +734,7 @@ int ff_rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st) rtsp_st->rtp_handle = NULL; if (ret < 0) return ret; + st->time_base = ((AVFormatContext*)rtsp_st->transport_priv)->streams[0]->time_base; } else if (rt->transport == RTSP_TRANSPORT_RAW) { return 0; // Don't need to open any parser here } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC) diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index 7e2bba7..246b7cf 100644 --- a/libavformat/sapenc.c +++ b/libavformat/sapenc.c @@ -157,6 +157,7 @@ static int sap_write_header(AVFormatContext *s) if (ret < 0) goto fail; s->streams[i]->priv_data = contexts[i]; + s->streams[i]->time_base = contexts[i]->streams[0]->time_base; av_strlcpy(contexts[i]->filename, url, sizeof(contexts[i]->filename)); } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
