aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dpx.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-06-13 14:19:45 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-06-15 01:21:48 +0200
commit78298bce70edda705ebfc61ee1d0b8a3b3dad772 (patch)
treed57e1c8753526877ecc4871d150398ba47247dfa /libavcodec/dpx.c
parent28d33c252ecaf1c4ce8a542eafb63a0836a2c6d2 (diff)
downloadffmpeg-78298bce70edda705ebfc61ee1d0b8a3b3dad772.tar.gz
lavc/dpx: Reset n_datum for every new line when decoding 12bit.
Fixes odd unpacked 12bit decoding. Reported-by: Piotr Bandurski
Diffstat (limited to 'libavcodec/dpx.c')
-rw-r--r--libavcodec/dpx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index fb388b6e52..e9f0e05ecd 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -234,10 +234,10 @@ static int decode_frame(AVCodecContext *avctx,
case 12:
if (!packing) {
int tested = 0;
- if (descriptor == 50 && endian && (avctx->width%8) == 0) { // Little endian and widths not a multiple of 8 need tests
+ if (descriptor == 50 && endian) { // Little endian needs tests
tested = 1;
}
- if (descriptor == 51 && endian && (avctx->width%2) == 0) { // Little endian and widths not a multiple of 2 need tests
+ if (descriptor == 51 && endian) { // Little endian needs tests
tested = 1;
}
if (!tested) {
@@ -422,6 +422,7 @@ static int decode_frame(AVCodecContext *avctx,
&n_datum, endian);
}
}
+ n_datum = 0;
for (i = 0; i < elements; i++)
ptr[i] += p->linesize[i];
// Jump to next aligned position