summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@xonotic.org>2013-04-09 10:06:54 +0200
committerRudolf Polzer <divverent@xonotic.org>2013-04-09 10:08:28 +0200
commit23bbbed06d9681728daa8f64190688c92562326a (patch)
tree3131660a899e7c3d0607d66dd9626a7dc84962b3 /demux/demux.c
parentafbf29da1ac18a78931dd21b49b2504a528a92a9 (diff)
downloadmpv-23bbbed06d9681728daa8f64190688c92562326a.tar.bz2
mpv-23bbbed06d9681728daa8f64190688c92562326a.tar.xz
demux: fix a specific gcc 4.8 warning that may hint to mis-optimized code
CC demux/demux.o demux/demux.c: In function 'demuxer_switch_track': demux/demux.c:1241:29: warning: array subscript is above array bounds [-Warray-bounds] int new_id = demuxer->ds[type]->id; ^
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 775dbfa845..ce1027b0f7 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1237,7 +1237,10 @@ void demuxer_switch_track(struct demuxer *demuxer, enum stream_type type,
if (demuxer->ds[type]->id != index2)
ds_free_packs(demuxer->ds[type]);
demuxer->ds[type]->id = index2;
+ } else {
+ abort();
}
+
int new_id = demuxer->ds[type]->id;
void *new = NULL;
if (new_id >= 0) {