summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/rtpenc_chain.c3
-rw-r--r--libavformat/rtsp.c1
-rw-r--r--libavformat/sapenc.c1
3 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index 794bd47fb8..dea1f70dac 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -98,9 +98,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 fcf9eca0d4..d25838a074 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -738,6 +738,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 2564698e7b..82a6ef67fd 100644
--- a/libavformat/sapenc.c
+++ b/libavformat/sapenc.c
@@ -158,6 +158,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));
}