adpcmdec: Fix OOM/infloop

Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/8/head
Michael Niedermayer 12 years ago
parent 34b6f1efa2
commit 807fa714f0
  1. 5
      libavcodec/adpcm.c

@ -1355,6 +1355,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
return -1;
}
if (avpkt->size && bytestream2_tell(&gb) == 0) {
av_log(avctx, AV_LOG_ERROR, "Nothing consumed\n");
return AVERROR_INVALIDDATA;
}
*got_frame_ptr = 1;
*(AVFrame *)data = c->frame;

Loading…
Cancel
Save