[FFmpeg-cvslog] lavf/rtsp: Fix a crash with the RTSP muxer.
Martin Storsjö
git at videolan.org
Thu Sep 15 14:53:23 EEST 2016
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Sep 15 13:50:57 2016 +0200| [f8a13c72132a65e34e05b878dc780ad330dd7371] | committer: Carl Eugen Hoyos
lavf/rtsp: Fix a crash with the RTSP muxer.
Introduced in 00e122bc / bc2a3296
The whole block that the statement was added to is only
relevant when used as a demuxer, but the other statements
there have had other if statements guarding them. Make
sure to only run this whole block if being used as a
demuxer.
Fixes ticket #5844.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f8a13c72132a65e34e05b878dc780ad330dd7371
---
libavformat/rtsp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 15e1ab8..c6292c5 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -834,7 +834,8 @@ int ff_rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
if (!rtsp_st->transport_priv) {
return AVERROR(ENOMEM);
- } else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RTP) {
+ } else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RTP &&
+ s->iformat) {
RTPDemuxContext *rtpctx = rtsp_st->transport_priv;
rtpctx->ssrc = rtsp_st->ssrc;
if (rtsp_st->dynamic_handler) {
More information about the ffmpeg-cvslog
mailing list