mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 08:29:36 +00:00
stream_lavf: fix a small memory leak
Also add an explanation why this special code path for rtsp is needed.
This commit is contained in:
parent
d585382f0e
commit
5dca96c1a4
@ -157,11 +157,15 @@ static int open_f(stream_t *stream, int mode)
|
|||||||
filename += strlen(prefix[i]);
|
filename += strlen(prefix[i]);
|
||||||
if (!strncmp(filename, "rtsp:", 5)) {
|
if (!strncmp(filename, "rtsp:", 5)) {
|
||||||
/* This is handled as a special demuxer, without a separate
|
/* 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->seek = NULL;
|
||||||
stream->demuxer = "lavf";
|
stream->demuxer = "lavf";
|
||||||
stream->lavf_type = "rtsp";
|
stream->lavf_type = "rtsp";
|
||||||
|
talloc_free(temp);
|
||||||
return STREAM_OK;
|
return STREAM_OK;
|
||||||
}
|
}
|
||||||
mp_msg(MSGT_OPEN, MSGL_V, "[ffmpeg] Opening %s\n", filename);
|
mp_msg(MSGT_OPEN, MSGL_V, "[ffmpeg] Opening %s\n", filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user