Message ID | 20240321202439.53471-1-leo.izen@gmail.com |
---|---|
State | Accepted |
Commit | 83ed18a3ca05caaaead58f8b662a3c00700823c5 |
Headers | show |
Series | [FFmpeg-devel] avformat/jpegxl_anim_dec: set pos for generic index | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavformat/jpegxl_anim_dec.c b/libavformat/jpegxl_anim_dec.c index f749b378b3..78dc16017d 100644 --- a/libavformat/jpegxl_anim_dec.c +++ b/libavformat/jpegxl_anim_dec.c @@ -171,6 +171,8 @@ static int jpegxl_anim_read_packet(AVFormatContext *s, AVPacket *pkt) av_buffer_unref(&ctx->initial); } + pkt->pos = avio_tell(pb) - offset; + ret = avio_read(pb, pkt->data + offset, size - offset); if (ret < 0) return ret;
avpkt->pos needs to be set for generic indexing or features such as the stream_loop option will not work. Co-authored-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Leo Izen <leo.izen@gmail.com> --- libavformat/jpegxl_anim_dec.c | 2 ++ 1 file changed, 2 insertions(+)