This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 948519015250476d04e544a2a6bf06be5eb44e46
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Nov 10 11:07:51 2026 +0000
Commit:     Peter Ross <[email protected]>
CommitDate: Sat Nov 21 20:51:25 2026 +0000

    avformat/dss: release packets dropped while seeking
    
    The seek walk calls the packet reader directly. Unreference the packet on 
FFERROR_REDO before reading the next frame, as the ordinary demux loop does. 
Otherwise av_new_packet overwrites the buffer reference and leaks one packet 
for each skipped frame.
    
    Assisted-by: Fairy
---
 libavformat/dss.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/dss.c b/libavformat/dss.c
index 9e7488869c..2be4efa6bc 100644
--- a/libavformat/dss.c
+++ b/libavformat/dss.c
@@ -569,8 +569,10 @@ static int dss_read_seek(AVFormatContext *s, int 
stream_index,
         return AVERROR(ENOMEM);
 
     while ((ret = dss_read_packet(s, pkt)) >= 0 || ret == FFERROR_REDO) {
-        if (ret < 0)
+        if (ret < 0) {
+            av_packet_unref(pkt);
             continue;
+        }
         av_packet_unref(ctx->seek_pkt);
         av_packet_move_ref(ctx->seek_pkt, pkt);
         if (ctx->seek_pkt->pts + ctx->seek_pkt->duration > timestamp)

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to