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

Git pushed a commit to branch master
in repository ffmpeg.

commit 1d5550613bd70343034d949a395ff888b2a8c561
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Jul 7 15:19:09 2026 +0800
Commit:     James Almer <[email protected]>
CommitDate: Tue Jul 7 19:04:42 2026 +0000

    avcodec/bsf/source: fix packet leak on av_packet_ref failure
    
    Signed-off-by: Zhao Zhili <[email protected]>
---
 libavcodec/bsf/source.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/bsf/source.c b/libavcodec/bsf/source.c
index 896538e5c9..cbc8c138b8 100644
--- a/libavcodec/bsf/source.c
+++ b/libavcodec/bsf/source.c
@@ -85,8 +85,10 @@ int attribute_align_arg 
av_bsf_source_add_packet(AVBitStreamFilterContext *ctx,
 
     if ((flags & AV_BSF_SOURCE_FLAG_KEEP_REF)) {
         ret = av_packet_ref(copy, pkt);
-        if (ret < 0)
+        if (ret < 0) {
+            av_packet_free(&copy);
             return ret;
+        }
     } else
         av_packet_move_ref(copy, pkt);
 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to