Browse Source

fix infinite loop

Originally committed as revision 5102 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 19 years ago
parent
commit
d00bff20b2
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/qdm2.c

+ 3
- 1
libavcodec/qdm2.c View File

@@ -2008,8 +2008,10 @@ static int qdm2_decode_frame(AVCodecContext *avctx,
{
QDM2Context *s = avctx->priv_data;

if((buf == NULL) || (buf_size < s->checksum_size))
if(!buf)
return 0;
if(buf_size < s->checksum_size)
return -1;

*data_size = s->channels * s->frame_size * sizeof(int16_t);



Loading…
Cancel
Save