demux: get rid of free_demuxer[_and_stream]()

Them being separate is just dumb. Replace them with a single
demux_free() function, and free its stream by default. Not freeing the
stream is only needed in 1 special case (demux_disc.c), use a special
flag to not free the stream in this case.
This commit is contained in:
wm4
2018-05-19 14:41:06 +02:00
parent 562d8e6d32
commit d33e5972b3
8 changed files with 31 additions and 27 deletions

View File

@@ -297,7 +297,7 @@ struct playlist *playlist_parse_file(const char *file, struct mp_cancel *cancel,
"pass it to the player\ndirectly. Don't use --playlist.\n");
}
}
free_demuxer_and_stream(d);
demux_free(d);
if (ret) {
mp_verbose(log, "Playlist successfully parsed\n");