Skip to content

Commit

Permalink
gpujpeg_reader get info: set restart_interval=0
Browse files Browse the repository at this point in the history
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 ef4fa04 from 2024-04-09.
  • Loading branch information
MartinPulec committed Aug 9, 2024
1 parent da96e2c commit 9a578d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gpujpeg_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9a578d4

Please sign in to comment.