mirror of https://github.com/mpv-player/mpv
audio/out: initialize an array to avoid confusing static analyzer
I _think_ this confuses Coverity and it thinks there is uninitialized data to be read. Initialize the array to change/remove the warning, or if there's a real problem, to make it easier to detect. (Basically apply defensive coding.)
This commit is contained in:
parent
c54673b86f
commit
6a9f457102
|
@ -190,7 +190,7 @@ int ao_read_data_converted(struct ao *ao, struct ao_convert_fmt *fmt,
|
|||
assert(ao->api == &ao_api_pull);
|
||||
|
||||
struct ao_pull_state *p = ao->api_priv;
|
||||
void *ndata[MP_NUM_CHANNELS];
|
||||
void *ndata[MP_NUM_CHANNELS] = {0};
|
||||
|
||||
if (!ao_need_conversion(fmt))
|
||||
return ao_read_data(ao, data, samples, out_time_us);
|
||||
|
|
Loading…
Reference in New Issue