[FFmpeg-cvslog] sgidec: simplify return path
Paul B Mahol
git at videolan.org
Sat Jul 27 14:05:34 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jul 26 21:09:06 2013 +0000| [5efa5103b0e7b5c63d36c4df224c2bdeff276413] | committer: Paul B Mahol
sgidec: simplify return path
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5efa5103b0e7b5c63d36c4df224c2bdeff276413
---
libavcodec/sgidec.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index e7f453b..c6e7508 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -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 = {
More information about the ffmpeg-cvslog
mailing list