[FFmpeg-cvslog] avcodec/tiff: factorize offset init code

Michael Niedermayer git at videolan.org
Sun Oct 27 13:25:43 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 27 13:10:06 2013 +0100| [46143d2555894ca1d5ef3c6e4446fb8f9cea0814] | committer: Michael Niedermayer

avcodec/tiff: factorize offset init code

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46143d2555894ca1d5ef3c6e4446fb8f9cea0814
---

 libavcodec/tiff.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index e8c9950..2b100ed 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -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) {



More information about the ffmpeg-cvslog mailing list