From 9a578d4b9c256cfdeba9b3c57a031b39b336a1a2 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 9 Aug 2024 10:50:43 +0200 Subject: [PATCH] gpujpeg_reader get info: set restart_interval=0 Set restart interval to zero for gpujpeg_reader_get_image_info() - it is actually checked if not change(unless 0), so any other inital value than zero and the actual DRI value will cause errors like: ``` GPUJPEG rev ef4fa04 [GPUJPEG] [Error] DRI marker can't redefine restart interval (8 to 4)! This may be caused when more DRI markers are presented which is not supported! ``` This fixes the commit ef4fa040c from 2024-04-09. --- src/gpujpeg_reader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gpujpeg_reader.c b/src/gpujpeg_reader.c index 24096063..d6763b71 100644 --- a/src/gpujpeg_reader.c +++ b/src/gpujpeg_reader.c @@ -1525,6 +1525,8 @@ gpujpeg_reader_get_image_info(uint8_t *image, size_t image_size, struct gpujpeg_ enum gpujpeg_color_space header_color_space = GPUJPEG_NONE; uint8_t *image_end = image + image_size; + param->restart_interval = 0; + // Check first SOI marker int marker_soi = gpujpeg_reader_read_marker(&image, image_end); if (marker_soi != GPUJPEG_MARKER_SOI) {