mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/wmaprodec: reset offsets when error happens
Fixes #6250. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
20c4fb2e01
commit
ce818d90bd
|
@ -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],
|
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->frames[s->current_stream]->extended_data[1], 512 * 4);
|
||||||
s->offset[s->current_stream]++;
|
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 ||
|
if (s->xma[s->current_stream].packet_done ||
|
||||||
|
|
Loading…
Reference in New Issue