diff options
author | wm4 <wm4@nowhere> | 2018-03-01 12:20:49 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-03-03 02:38:01 +0200 |
commit | 9f802d134bab122189b0f9373d388d37265ad2f5 (patch) | |
tree | 1579266c62660841aa962dda7ddfe824bf774fae | |
parent | 3263f47d3355502e3c7d3744c9d5160cd2776c0c (diff) | |
download | mpv-9f802d134bab122189b0f9373d388d37265ad2f5.tar.bz2 mpv-9f802d134bab122189b0f9373d388d37265ad2f5.tar.xz |
demux_edl: fix undefined behavior if mp4 init segment is not provided
param_names[n] is only valid for n<nparam.
-rw-r--r-- | demux/demux_edl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_edl.c b/demux/demux_edl.c index 5bab4ae983..36a9c2cc3b 100644 --- a/demux/demux_edl.c +++ b/demux/demux_edl.c @@ -138,7 +138,7 @@ static struct tl_parts *parse_edl(bstr str) bstr type = param_vals[0]; // value, because no "=" if (bstr_equals0(type, "mp4_dash")) { tl->dash = true; - if (bstr_equals0(param_names[1], "init")) + if (nparam > 1 && bstr_equals0(param_names[1], "init")) tl->init_fragment_url = bstrto0(tl, param_vals[1]); } continue; |