summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Kunhya <kieran@kunhya.com>2016-03-05 18:06:41 +0000
committerAnton Khirnov <anton@khirnov.net>2016-07-25 13:57:00 +0200
commit61d95c500d9ea01f6262aff8533e52b897ed0ddb (patch)
tree9b9fc41a550dc4fbf3b8d061811d1615272b9776
parentd97392e6b5c7f83e166ce02bc407d88d098ff2c0 (diff)
cfhd: Make sure tags are read at 4-byte offsets
Signed-off-by: Diego Biurrun <diego@biurrun.de>
-rw-r--r--libavcodec/cfhd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 382ed7b16e..b931d44033 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -465,6 +465,9 @@ static int read_lowpass_coeffs(AVCodecContext *avctx, CFHDContext *s,
coeff_data += lowpass_width;
}
+ /* Align to mod-4 position to continue reading tags */
+ bytestream2_seek(gb, bytestream2_tell(gb) & 3, SEEK_CUR);
+
/* Copy last coefficients line if odd height */
if (lowpass_height & 1) {
memcpy(&coeff_data[lowpass_height * lowpass_width],