[FFmpeg-devel] [PATCH] jpeg2000dec: minor simplification in setting the return value.

Michael Niedermayer michaelni at gmx.at
Wed May 8 17:55:44 CEST 2013


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/jpeg2000dec.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 2a71d1d..09f973b 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1301,11 +1301,10 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
     for (tileno = 0; tileno < s->numXtiles * s->numYtiles; tileno++)
         if (ret = jpeg2000_decode_tile(s, s->tile + tileno, picture))
             goto end;
-    jpeg2000_dec_cleanup(s);
 
     *got_frame = 1;
 
-    return s->buf - s->buf_start;
+    ret = s->buf - s->buf_start;
 end:
     jpeg2000_dec_cleanup(s);
     return ret;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list