]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/dvbsubdec: restructure version check
authorAnshul Maheshwari <anshul.ffmpeg@gmail.com>
Sat, 14 Jun 2014 11:36:37 +0000 (17:06 +0530)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 15 Jun 2014 17:56:09 +0000 (19:56 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dvbsubdec.c

index 1809e9d8e047f557fcc3614e8e5a86f5d050f056..3c4ccb8dfbfe7b8e5645cf9710e0ee88f051537d 100644 (file)
@@ -1167,7 +1167,9 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx,
     version = ((*buf)>>4) & 15;
     page_state = ((*buf++) >> 2) & 3;
 
-    if (ctx->version != version) {
+    if (ctx->version == version) {
+        return;
+    }
 
     ctx->time_out = timeout;
     ctx->version = version;
@@ -1220,7 +1222,6 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx,
 
         av_free(display);
     }
-    }
 
 }