I suggest fixing Line 416 and 430 as follows.

> - int cond = stream->pos <= length;
> + int cond = stream->pos < length;

Those are also related to the issue (ticket 10905.)


> On May 20, 2024, at 1:09, Pierre-Anthony Lemieux <[email protected]> wrote:
> 
> On Sun, May 19, 2024 at 9:02?AM Andreas Rheinhardt
> <[email protected]> wrote:
>> 
>> [email protected]:
>>> From: Pierre-Anthony Lemieux <[email protected]>
>>> 
>>> Addresses https://trac.ffmpeg.org/ticket/10905
>>> 
>>> Co-authored-by: Osamu Watanabe <[email protected]>
>>> Signed-off-by: Pierre-Anthony Lemieux <[email protected]>
>>> --> @@ -1297,14 +1299,14 @@ ff_jpeg2000_decode_htj2k(const
>> Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c
>>>     for (int y = 0; y < height; y++) {
>>>         for (int x = 0; x < width; x++) {
>>>             n = x + (y * t1->stride);
>>> -            val = sample_buf[x + (y * width)];
>>> +            val = sample_buf[x + (y * quad_buf_width)];
>>>             /* Convert sign-magnitude to two's complement. */
>>>             val = val >> 31 ? 0x80000000 - val : val;
>>>             val >>= (pLSB - 1);
>>>             t1->data[n] = val;
>>>         }
>>>     }
>>> -free:
>>> +    free:
>> 
>> Spurious change. It also seems unintentional and undesirable.
> 
> Yes. Will fix before merging.
> 
>> 
>>>     av_freep(&sample_buf);
>>>     av_freep(&block_states);
>>>     return ret;
>> 
>> _______________________________________________
>> ffmpeg-devel mailing list
>> [email protected]
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> [email protected] with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> [email protected]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe".


_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to