From e4c5876f574432ea852e58e8f4469cc775c7201e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 24 Jun 2015 21:26:06 +0200 Subject: player, demux: replace some demux_open() uses with demux_open_url() --- demux/demux_cue.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'demux/demux_cue.c') diff --git a/demux/demux_cue.c b/demux/demux_cue.c index 2b73e36a9d..cbe06ca5cf 100644 --- a/demux/demux_cue.c +++ b/demux/demux_cue.c @@ -56,10 +56,7 @@ static bool try_open(struct timeline *tl, char *filename) || bstrcasecmp(bstr0(tl->demuxer->filename), bfilename) == 0) return false; - struct stream *s = stream_create(filename, STREAM_READ, tl->cancel, tl->global); - if (!s) - return false; - struct demuxer *d = demux_open(s, NULL, tl->global); + struct demuxer *d = demux_open_url(filename, NULL, tl->cancel, tl->global); // Since .bin files are raw PCM data with no headers, we have to explicitly // open them. Also, try to avoid to open files that are most likely not .bin // files, as that would only play noise. Checking the file extension is @@ -69,14 +66,13 @@ static bool try_open(struct timeline *tl, char *filename) if (!d && bstr_case_endswith(bfilename, bstr0(".bin"))) { MP_WARN(tl, "CUE: Opening as BIN file!\n"); struct demuxer_params p = {.force_format = "rawaudio"}; - d = demux_open(s, &p, tl->global); + d = demux_open_url(filename, &p, tl->cancel, tl->global); } if (d) { add_source(tl, d); return true; } MP_ERR(tl, "Could not open source '%s'!\n", filename); - free_stream(s); return false; } -- cgit v1.2.3