Commit df379502 authored by Martin Storsjö's avatar Martin Storsjö

rtsp: Fix a crash with the RTSP muxer

This was introduced in 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.

CC: libav-stable@libav.org
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent bdf7610e
......@@ -827,7 +827,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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment