History

libavcodec/jpeg2000dec.c: Handle non EOC streams

This patch allows decoding of j2k streams which do not have an EOC marker.

Gautam Ramakrishnan committed 6 years ago

Commit e116cb41 parent ec7fb451 file · +6 −2Browse files

Unified · Split

libavcodec/jpeg2000dec.c+6−2
@@ -1939,8 +1939,12 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) · 1938 unmodified lines
1939 1939
1940 len = bytestream2_get_be16(&s->g);1940 len = bytestream2_get_be16(&s->g);
1941 if (len < 2 || bytestream2_get_bytes_left(&s->g) < len - 2) {1941 if (len < 2 || bytestream2_get_bytes_left(&s->g) < len - 2) {
1942 av_log(s->avctx, AV_LOG_ERROR, "Invalid len %d left=%d\n", len, bytestream2_get_bytes_left(&s->g));1942 if (s->avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT) {
1943 return AVERROR_INVALIDDATA;1943 av_log(s->avctx, AV_LOG_ERROR, "Invalid len %d left=%d\n", len, bytestream2_get_bytes_left(&s->g));
1944 return AVERROR_INVALIDDATA;
1945 }
1946 av_log(s->avctx, AV_LOG_WARNING, "Missing EOC Marker.\n");
1947 break;
1944 }1948 }
1945 1949
1946 switch (marker) {1950 switch (marker) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t