OSDN Git Service

flashsv: simplify condition
authorDiego Biurrun <diego@biurrun.de>
Wed, 29 Jun 2011 23:00:30 +0000 (01:00 +0200)
committerDiego Biurrun <diego@biurrun.de>
Wed, 6 Jul 2011 11:21:26 +0000 (13:21 +0200)
libavcodec/flashsv.c

index 837a922..37bff0a 100644 (file)
@@ -187,9 +187,8 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
                 return AVERROR_INVALIDDATA;
             }
 
-            if (size == 0) {
-                /* no change, don't do anything */
-            } else {
+            /* skip unchanged blocks, which have size 0 */
+            if (size) {
                 /* decompress block */
                 int ret = inflateReset(&s->zstream);
                 if (ret != Z_OK) {