Module: libav
Branch: release/11
Commit: 586c78159a11328319c244aff927f80b4e411335

Author:    Martin Storsjö <mar...@martin.st>
Committer: Sean McGovern <gsean...@gmail.com>
Date:      Thu Sep 15 14:21:38 2016 +0300

rtsp: Fix a crash with the RTSP muxer

This was introduced in bc2a32969e.

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.

CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö <mar...@martin.st>
(cherry picked from commit df3795025337479a639cb3cd26c93a4e82ccd4db)
Signed-off-by: Sean McGovern <gsean...@gmail.com>

Conflicts:
        libavformat/rtsp.c

---

 libavformat/rtsp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 950abff..15487b2 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -770,7 +770,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) {
         if (rtsp_st->dynamic_handler) {
             ff_rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv,
                                               
rtsp_st->dynamic_protocol_context,

_______________________________________________
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to