sgidec: simplify return path
authorPaul B Mahol <onemda@gmail.com>
Fri, 26 Jul 2013 21:09:06 +0000 (21:09 +0000)
committerPaul B Mahol <onemda@gmail.com>
Sat, 27 Jul 2013 12:00:25 +0000 (12:00 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/sgidec.c

index e7f453b..c6e7508 100644 (file)
@@ -223,13 +223,11 @@ static int decode_frame(AVCodecContext *avctx,
     } else {
         ret = read_uncompressed_sgi(out_buf, s);
     }
-
-    if (ret == 0) {
-        *got_frame = 1;
-        return avpkt->size;
-    } else {
+    if (ret)
         return ret;
-    }
+
+    *got_frame = 1;
+    return avpkt->size;
 }
 
 AVCodec ff_sgi_decoder = {