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

Git pushed a commit to branch master
in repository ffmpeg.

commit ad5c00b0ce43c6c5bc4c2677699fb2876bf58379
Author:     Ruk Doe <[email protected]>
AuthorDate: Sat Oct 10 15:05:16 2026 +0900
Commit:     michaelni <[email protected]>
CommitDate: Fri Nov 6 04:39:07 2026 +0000

    avcodec/libaribcaption: keep the clear when ass mode skips every region as 
ruby
    
    With ignore_ruby=1 and ass_single_rect=0, a caption whose regions are all
    ruby skips every region and returned no event, even when it carries a
    clear screen (CS). The previous caption then stayed on screen. The bitmap
    path and ass_single_rect=1 already erase it in that case.
    
    Emit the empty clear event in that case too.
    
    Such captions do occur in broadcasts: among 2293 captions from 40 recent
    Japanese TV recordings, 3 carried CS with only ruby regions. With this
    change, ignore_ruby=1 output gains exactly those 3 clear events, and
    output with the default options is unchanged for all 40 recordings.
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
    Claude-Session: https://claude.ai/code/session_01DdDiDRusmi6eD7qSrKBjHb
---
 libavcodec/libaribcaption.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/libaribcaption.c b/libavcodec/libaribcaption.c
index b9a7c2ff80..3e930d68a0 100644
--- a/libavcodec/libaribcaption.c
+++ b/libavcodec/libaribcaption.c
@@ -781,6 +781,15 @@ static int 
aribcaption_trans_ass_subtitle(ARIBCaptionContext *ctx)
             rect_idx++;
         }
     }
+    if (!single_rect && !rect_idx) {
+        /* Every region was skipped as ruby. A clear screen (CS) must still
+           erase the previous caption. */
+        av_bprint_finalize(&buf, NULL);
+        if (!(ctx->caption.flags & ARIBCC_CAPTIONFLAGS_CLEARSCREEN))
+            return 0;
+        ret = ff_ass_add_rect(sub, "", ctx->readorder++, 0, NULL, NULL);
+        return ret < 0 ? ret : 1;
+    }
     if (single_rect) {
         if (!av_bprint_is_complete(&buf)) {
             ret = AVERROR(ENOMEM);

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