[FFmpeg-soc] [soc]: r1201 - jpeg2000/j2kdec.c

k.nowosad subversion at mplayerhq.hu
Mon Aug 27 14:14:49 CEST 2007


Author: k.nowosad
Date: Mon Aug 27 14:14:49 2007
New Revision: 1201

Log:
added missing return value check


Modified:
   jpeg2000/j2kdec.c

Modified: jpeg2000/j2kdec.c
==============================================================================
--- jpeg2000/j2kdec.c	(original)
+++ jpeg2000/j2kdec.c	Mon Aug 27 14:14:49 2007
@@ -199,7 +199,7 @@ static int tag_tree_decode(J2kDecoderCon
 /** get sizes and offsets of image, tiles; number of components */
 static int get_siz(J2kDecoderContext *s)
 {
-    int i;
+    int i, ret;
 
     if (s->buf_end - s->buf < 36)
         return AVERROR(EINVAL);
@@ -256,7 +256,8 @@ static int get_siz(J2kDecoderContext *s)
     if (s->picture.data[0])
         s->avctx->release_buffer(s->avctx, &s->picture);
 
-    s->avctx->get_buffer(s->avctx, &s->picture);
+    if ((ret = s->avctx->get_buffer(s->avctx, &s->picture)) < 0)
+        return ret;
 
     s->picture.pict_type = FF_I_TYPE;
     s->picture.key_frame = 1;



More information about the FFmpeg-soc mailing list