mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
wmalosslessdec: reset frame->nb_samples on packet loss
Otherwise a frame with non-zero nb_samples but without any data can be returned. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit 42e7a5b3c704985c2c18970cc94a837b413df9d9) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9e52f6b986
commit
9463930faf
@ -1029,6 +1029,7 @@ static int decode_frame(WmallDecodeCtx *s)
|
||||
if ((ret = ff_get_buffer(s->avctx, s->frame, 0)) < 0) {
|
||||
/* return an error if no frame could be decoded at all */
|
||||
s->packet_loss = 1;
|
||||
s->frame->nb_samples = 0;
|
||||
return ret;
|
||||
}
|
||||
for (i = 0; i < s->num_channels; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user