mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
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: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1ae092587f
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
52bf144ad9
commit
bffed1d9d0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user