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

Git pushed a commit to branch master
in repository ffmpeg.

commit 34b2175e809f7b0d22ffa51e51a7f8cbfe752760
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Sep 15 17:38:55 2026 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Sat Sep 19 17:46:51 2026 +0000

    avcodec/videotoolboxenc: fail when no frame is encoded for extradata
    
    VideoToolbox reports a dropped frame as success with no sample buffer,
    which is why vtenc_output_callback() checks for it (see 6966548c1bd,
    reported to happen often on iOS 11). If the single frame sent to
    populate extradata is dropped, nothing is queued, vtenc_q_pop()
    returns success with a NULL buffer, and the unconditional CFRelease()
    releases NULL. Fail where the missing buffer is detected.
---
 libavcodec/videotoolboxenc.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 1c119991da..ab74364ae6 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -2675,9 +2675,14 @@ static int vtenc_populate_extradata(AVCodecContext   
*avctx,
         goto pe_cleanup;
     }
 
-    CFRelease(buf);
-
+    if (!buf) {
+        // VideoToolbox reports a dropped frame as success with no buffer.
+        av_log(avctx, AV_LOG_ERROR, "Extradata frame dropped, no param 
sets\n");
+        status = AVERROR_EXTERNAL;
+        goto pe_cleanup;
+    }
 
+    CFRelease(buf);
 
 pe_cleanup:
     CVPixelBufferRelease(pix_buf);

-- 
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