Commit 42e7a5b3 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent f9020d51
......@@ -1005,6 +1005,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++) {
......
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