mirror of
https://github.com/mpv-player/mpv
synced 2025-02-28 03:10:55 +00:00
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; ^
This commit is contained in:
parent
afbf29da1a
commit
23bbbed06d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user