rtsp: Free the rtpdec context properly
authorMartin Storsjö <martin@martin.st>
Fri, 17 Aug 2012 19:22:17 +0000 (22:22 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 27 Aug 2012 09:29:47 +0000 (12:29 +0300)
The condition for calling the rtpdec cleanup was broken in
df8cf076c86.

This fixes a memory leak.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtsp.c

index ce18610..0390862 100644 (file)
@@ -568,7 +568,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s)
                 avformat_free_context(rtpctx);
             } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
                 ff_rdt_parse_close(rtsp_st->transport_priv);
-            else if (rt->transport == RTSP_TRANSPORT_RAW && CONFIG_RTPDEC)
+            else if (rt->transport == RTSP_TRANSPORT_RTP && CONFIG_RTPDEC)
                 ff_rtp_parse_close(rtsp_st->transport_priv);
         }
         rtsp_st->transport_priv = NULL;