Browse Source

cdgraphics: do not return 0 from the decode function

0 means no data consumed, so it can trigger an infinite loop in the
caller.

CC:libav-stable@libav.org
tags/n2.4
Anton Khirnov 11 years ago
parent
commit
c7d9b473e2
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavcodec/cdgraphics.c

+ 1
- 2
libavcodec/cdgraphics.c View File

@@ -349,10 +349,9 @@ static int cdg_decode_frame(AVCodecContext *avctx,
*got_frame = 1; *got_frame = 1;
} else { } else {
*got_frame = 0; *got_frame = 0;
buf_size = 0;
} }


return buf_size;
return avpkt->size;
} }


static av_cold int cdg_decode_end(AVCodecContext *avctx) static av_cold int cdg_decode_end(AVCodecContext *avctx)


Loading…
Cancel
Save