Commit c5a07f1f authored by James Almer's avatar James Almer

libdcadec: search for frames that start late in a packet

Based on commit 4ae15605Reviewed-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent db5ea69d
......@@ -58,7 +58,10 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
if (!s->buffer)
return AVERROR(ENOMEM);
if ((ret = avpriv_dca_convert_bitstream(avpkt->data, avpkt->size, s->buffer, s->buffer_size)) < 0)
for (i = 0, ret = AVERROR_INVALIDDATA; i < input_size - 3 && ret < 0; i++)
ret = avpriv_dca_convert_bitstream(input + i, input_size - i, s->buffer, s->buffer_size);
if (ret < 0)
return ret;
input = s->buffer;
......
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