Commit ce818d90 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/wmaprodec: reset offsets when error happens

Fixes #6250.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 20c4fb2e
......@@ -1760,6 +1760,10 @@ static int xma_decode_packet(AVCodecContext *avctx, void *data,
memcpy(&s->samples[s->current_stream * 2 + 1][s->offset[s->current_stream] * 512],
s->frames[s->current_stream]->extended_data[1], 512 * 4);
s->offset[s->current_stream]++;
} else if (ret < 0) {
memset(s->offset, 0, sizeof(s->offset));
s->current_stream = 0;
return ret;
}
if (s->xma[s->current_stream].packet_done ||
......
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