[FFmpeg-cvslog] avformat/jpegxl_anim_dec: set pos for generic index

Leo Izen git at videolan.org
Sat Mar 23 13:29:35 EET 2024


ffmpeg | branch: master | Leo Izen <leo.izen at gmail.com> | Thu Mar 21 16:24:39 2024 -0400| [83ed18a3ca05caaaead58f8b662a3c00700823c5] | committer: Leo Izen

avformat/jpegxl_anim_dec: set pos for generic index

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 at outlook.com>
Signed-off-by: Leo Izen <leo.izen at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83ed18a3ca05caaaead58f8b662a3c00700823c5
---

 libavformat/jpegxl_anim_dec.c | 2 ++
 1 file changed, 2 insertions(+)

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;



More information about the ffmpeg-cvslog mailing list