summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-21 16:08:09 +0100
committerwm4 <wm4@nowhere>2013-12-01 19:28:46 +0100
commitf450e5c397f8ddd032631134c4e00d8c33cd2c3b (patch)
tree41600940cfdf8a55b6927f850ee849d99b01ab8c
parente70580df3061321d1862a5a4ed17dabed157b06f (diff)
downloadmpv-f450e5c397f8ddd032631134c4e00d8c33cd2c3b.tar.bz2
mpv-f450e5c397f8ddd032631134c4e00d8c33cd2c3b.tar.xz
stream_lavf: fix a small memory leak
Also add an explanation why this special code path for rtsp is needed.
-rw-r--r--stream/stream_lavf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c
index eecb3f6579..22961044ce 100644
--- a/stream/stream_lavf.c
+++ b/stream/stream_lavf.c
@@ -157,11 +157,15 @@ static int open_f(stream_t *stream, int mode)
filename += strlen(prefix[i]);
if (!strncmp(filename, "rtsp:", 5)) {
/* This is handled as a special demuxer, without a separate
- * stream layer. demux_lavf will do all the real work.
+ * stream layer. demux_lavf will do all the real work. Note
+ * that libavformat doesn't even provide a protocol entry for
+ * this (the rtsp demuxer's probe function checks for a "rtsp:"
+ * filename prefix), so it has to be handled specially here.
*/
stream->seek = NULL;
stream->demuxer = "lavf";
stream->lavf_type = "rtsp";
+ talloc_free(temp);
return STREAM_OK;
}
mp_msg(MSGT_OPEN, MSGL_V, "[ffmpeg] Opening %s\n", filename);