Commit 46143d25 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/tiff: factorize offset init code

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d5ad4e4a
...@@ -578,6 +578,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) ...@@ -578,6 +578,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
goto end; goto end;
} }
off = bytestream2_tell(&s->gb);
if (count == 1) { if (count == 1) {
switch (type) { switch (type) {
case TIFF_BYTE: case TIFF_BYTE:
...@@ -590,11 +591,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) ...@@ -590,11 +591,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
break; break;
} }
default: default:
off = bytestream2_tell(&s->gb);
value = UINT_MAX; value = UINT_MAX;
} }
} else {
off = bytestream2_tell(&s->gb);
} }
switch (tag) { switch (tag) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment