diff mbox

[FFmpeg-devel] lavc/dpx: Two possible patches to fix 10bit gray images

Message ID CAB0OVGr5Htcqkt3BjvKStFqcPOYvEwb4GW7U4fpZJ1JAX5VAsg@mail.gmail.com
State New
Headers show

Commit Message

Carl Eugen Hoyos Nov. 20, 2019, 4:59 p.m. UTC
Hi!

Attached are two patches that fix ticket #8390, I would prefer not to
add more special cases but others may disagree.

Please comment, Carl Eugen
diff mbox

Patch

From f9e368fe415ee009aee9b9e8ba516a64259a6516 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Wed, 20 Nov 2019 17:51:08 +0100
Subject: [PATCH] lavc/dpx: Assume that all 10bit gray images have no line
 padding.

Fixes ticket #8390.
---
 libavcodec/dpx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index b1833ed9ef..be7481dbaa 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -422,7 +422,7 @@  static int decode_frame(AVCodecContext *avctx,
                     read10in32(&buf, &rgbBuffer,
                                &n_datum, endian, shift);
             }
-            if (memcmp(input_device, "Scanity", 7))
+            if (elements > 1)
                 n_datum = 0;
             for (i = 0; i < elements; i++)
                 ptr[i] += p->linesize[i];
-- 
2.23.0