From fb726ef09a40d4ba4ca4e823f868b0f869a73bcd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 5 Oct 2013 01:33:52 +0200 Subject: [PATCH] avcodec/dpx: fix reading of the packing field Signed-off-by: Michael Niedermayer --- libavcodec/dpx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 11f692fea4..59845c700d 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -125,9 +125,9 @@ static int decode_frame(AVCodecContext *avctx, avctx->bits_per_raw_sample = bits_per_color = buf[0]; buf++; - packing = *((uint16_t*)buf); + packing = read16(&buf, endian); - buf += 824; + buf += 822; avctx->sample_aspect_ratio.num = read32(&buf, endian); avctx->sample_aspect_ratio.den = read32(&buf, endian); if (avctx->sample_aspect_ratio.num > 0 && avctx->sample_aspect_ratio.den > 0)