jpegdec: Call gst_jpeg_turbo_parse_ext_fmt_convert() before jpeg_start_decompress()
authorMarek Vasut <marex@denx.de>
Fri, 11 Feb 2022 22:44:24 +0000 (23:44 +0100)
committerMarek Vasut <marex@denx.de>
Sun, 13 Feb 2022 13:46:31 +0000 (14:46 +0100)
commitd277002186d33eed505d030bfba0ad30624306aa
tree5b3ede86ea7431c9feeac461ecbd9718277703b1
parent4ee4a9bff96f2bc93796bfeadafe618fb6e5e94e
jpegdec: Call gst_jpeg_turbo_parse_ext_fmt_convert() before jpeg_start_decompress()

It is imperative that the libjpeg-turbo state is properly initialized
before jpeg_start_decompress() is called. Make sure cinfo.out_color_space
and cinfo.raw_data_out are set to their final values matching their peer
caps before calling jpeg_start_decompress().

Fixes: e6d83d8f96 ("jpegdec: Support libjpeg-turbo colorspace conversion")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1687>
subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c