summaryrefslogtreecommitdiffstats
path: root/demux/demux_mkv_timeline.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-23 18:24:28 +0100
committerwm4 <wm4@nowhere>2015-03-23 18:24:28 +0100
commitf92c7fa807aa71f04de294afbe9745f7784a645c (patch)
tree19eed6e83d9d7279a0c1f9066e1efeb90747896b /demux/demux_mkv_timeline.c
parent68b71346ec2b333b14f9e2d661e16aba8cdca200 (diff)
downloadmpv-f92c7fa807aa71f04de294afbe9745f7784a645c.tar.bz2
mpv-f92c7fa807aa71f04de294afbe9745f7784a645c.tar.xz
demux_mkv_timeline: don't continue if reopening file failed
Could theoretically dereference "d" later in the loop. It's on an error codepath, so just give up.
Diffstat (limited to 'demux/demux_mkv_timeline.c')
-rw-r--r--demux/demux_mkv_timeline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_mkv_timeline.c b/demux/demux_mkv_timeline.c
index 3326362226..09e411eda7 100644
--- a/demux/demux_mkv_timeline.c
+++ b/demux/demux_mkv_timeline.c
@@ -217,7 +217,7 @@ static bool check_file_seg(struct tl_ctx *ctx, char *filename, int segment)
params.matroska_wanted_uids = ctx->uids; // potentially reallocated, same data
d = demux_open_url(filename, &params, cancel, ctx->global);
if (!d)
- continue;
+ return false;
}
ctx->sources[i] = d;