decoder/ffmpeg: use memset() to initialize AVProbeData
This commit is contained in:
parent
219c42522f
commit
c14a00eec9
@ -383,6 +383,12 @@ ffmpeg_probe(Decoder *decoder, InputStream &is)
|
|||||||
nbytes -= PADDING;
|
nbytes -= PADDING;
|
||||||
|
|
||||||
AVProbeData avpd;
|
AVProbeData avpd;
|
||||||
|
|
||||||
|
/* new versions of ffmpeg may add new attributes, and leaving
|
||||||
|
them uninitialized may crash; hopefully, zero-initializing
|
||||||
|
everything we don't know is ok */
|
||||||
|
memset(&avpd, 0, sizeof(avpd));
|
||||||
|
|
||||||
avpd.buf = buffer;
|
avpd.buf = buffer;
|
||||||
avpd.buf_size = nbytes;
|
avpd.buf_size = nbytes;
|
||||||
avpd.filename = is.uri.c_str();
|
avpd.filename = is.uri.c_str();
|
||||||
|
Loading…
Reference in New Issue
Block a user