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

Git pushed a commit to branch master
in repository ffmpeg.

commit 693ca902c1018ac4c449f0611002627e54cd7731
Author:     Marton Balint <[email protected]>
AuthorDate: Sat Feb 7 00:36:07 2026 +0100
Commit:     Marton Balint <[email protected]>
CommitDate: Sun Feb 15 20:28:31 2026 +0100

    avformat/matroskaenc: write AlphaMode flag for all VP8 and VP9 pixel 
formats with alpha
    
    Let's check the pixel format descriptor flags instead of hardcoding a 
specific
    pixel format.
    
    Signed-off-by: Marton Balint <[email protected]>
---
 libavformat/matroskaenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index afaa38b3a2..2c85672389 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1795,7 +1795,8 @@ static bool 
codec_has_blockadditional_alpha(AVFormatContext *s, const AVStream *
     if (par->codec_id != AV_CODEC_ID_VP8 &&
         par->codec_id != AV_CODEC_ID_VP9)
         return false;
-    if (par->format == AV_PIX_FMT_YUVA420P)
+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(par->format);
+    if (desc && (desc->flags & AV_PIX_FMT_FLAG_ALPHA))
         return true;
     return ((tag = av_dict_get(st->metadata, "alpha_mode", NULL, 0)) ||
             (tag = av_dict_get( s->metadata, "alpha_mode", NULL, 0))) && 
strtol(tag->value, NULL, 0);

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

Reply via email to