Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGautam Ramakrishnan <gautamramk@gmail.com>2020-07-21 21:07:14 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-23 17:30:02 +0300
commitb61d3dfab0d75daf81f366c12c57539c90e9b38b (patch)
tree85e6b0476183b3c9bc668eadb647529d1f900097 /libavcodec/jpeg2000dec.c
parent5eb4405fc5da27583ee748268fc4e49a8c0c5b54 (diff)
libavcodec/jpeg2000dec: Add check when done with main header markers
This patch sets a flag when the processing of the main header is complete. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/jpeg2000dec.c')
-rw-r--r--libavcodec/jpeg2000dec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index f5ad8402fb..e941ebb5d0 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -102,6 +102,7 @@ typedef struct Jpeg2000DecoderContext {
uint8_t cbps[4]; // bits per sample in particular components
uint8_t sgnd[4]; // if a component is signed
uint8_t properties[4];
+ uint8_t in_tile_headers;
int cdx[4], cdy[4];
int precision;
int ncomponents;
@@ -2165,6 +2166,9 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
ret = get_poc(s, len, poc);
break;
case JPEG2000_SOT:
+ if (!s->in_tile_headers) {
+ s->in_tile_headers = 1;
+ }
if (!(ret = get_sot(s, len))) {
av_assert1(s->curtileno >= 0);
codsty = s->tile[s->curtileno].codsty;