From 87b90d0b6f60d2cd005bd9417f2ecd2f7a781bcd Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 28 Apr 2025 11:31:49 +0200 Subject: [PATCH 3/5] avformat/apvdec: Fix seeking pkt->pos pointed to the actual packet data, not to the start of the access unit. Signed-off-by: Andreas Rheinhardt --- libavformat/apvdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/apvdec.c b/libavformat/apvdec.c index 6a972c6d9a..a0a2b7681e 100644 --- a/libavformat/apvdec.c +++ b/libavformat/apvdec.c @@ -227,6 +227,7 @@ static int apv_read_packet(AVFormatContext *s, AVPacket *pkt) ret = av_get_packet(s->pb, pkt, au_size); if (ret < 0) return ret; + pkt->pos -= 4; pkt->flags = AV_PKT_FLAG_KEY; signature = AV_RB32(pkt->data); -- 2.45.2