[FFmpeg-devel] [PATCH] avcodec/mjpegdec: Try to continue decoding on zero quant matrix value

Michael Niedermayer michael at niedermayer.cc
Sun Jul 4 22:28:00 EEST 2021


On Sat, Jul 03, 2021 at 12:25:28PM -0400, Andriy Gelman wrote:
> From: Andriy Gelman <andriy.gelman at gmail.com>
> 
> A zero value in the quantization matrix is invalid but in practice will
> just set the transform coefficient to zero after inverse quantization.
> Try to continue decoding if the AV_EF_EXPLODE flag is not set.
> 
> Fixes ticket #9287.
> 
> Signed-off-by: Andriy Gelman <andriy.gelman at gmail.com>
> ---
> 
> The last frame in the sample of the ticket does not decode because the
> input file appears truncated.
> Something like the following patch would still be needed to output the final
> frame:
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210627135307.14008-1-michael@niedermayer.cc/
> 
>  libavcodec/mjpegdec.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210704/558c38ec/attachment.sig>


More information about the ffmpeg-devel mailing list