avcodec/tiff: factorize offset init code
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 27 Oct 2013 12:10:06 +0000 (13:10 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 27 Oct 2013 12:10:38 +0000 (13:10 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/tiff.c

index e8c9950..2b100ed 100644 (file)
@@ -578,6 +578,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
         goto end;
     }
 
+    off = bytestream2_tell(&s->gb);
     if (count == 1) {
         switch (type) {
         case TIFF_BYTE:
@@ -590,11 +591,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
                 break;
             }
         default:
-            off   = bytestream2_tell(&s->gb);
             value = UINT_MAX;
         }
-    } else {
-        off   = bytestream2_tell(&s->gb);
     }
 
     switch (tag) {