diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2013-04-09 10:06:54 +0200 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2013-04-09 10:08:28 +0200 |
commit | 23bbbed06d9681728daa8f64190688c92562326a (patch) | |
tree | 3131660a899e7c3d0607d66dd9626a7dc84962b3 | |
parent | afbf29da1ac18a78931dd21b49b2504a528a92a9 (diff) | |
download | mpv-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;
^
-rw-r--r-- | demux/demux.c | 3 |
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) { |