Commit 1ae09258 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/opusdec: Clear out pointers per packet

This is safer than to assume that all error pathes cleared them and
nothing will use uncleared pointers.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e3201c38
......@@ -450,6 +450,12 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data,
int decoded_samples = 0;
int i, ret;
for (i = 0; i < c->nb_streams; i++) {
OpusStreamContext *s = &c->streams[i];
s->out[0] =
s->out[1] = NULL;
}
/* decode the header of the first sub-packet to find out the sample count */
if (buf) {
OpusPacket *pkt = &c->streams[0].packet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment