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

Git pushed a commit to branch master
in repository ffmpeg.

commit 95d3d992f5afb2d9fe22698e3f6916592a6701af
Author:     James Almer <[email protected]>
AuthorDate: Wed Sep 16 10:16:35 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Mon Sep 21 18:02:12 2026 -0300

    avformat/avformat: ignore enhancement only streams in av_find_best_stream()
    
    They can't be decoded on their own.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/avformat.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index ae12f00975..5d9d8c3697 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -526,8 +526,11 @@ int av_find_best_stream(AVFormatContext *ic, enum 
AVMediaType type,
         int real_stream_index = program ? program[i] : i;
         AVStream *st          = ic->streams[real_stream_index];
         AVCodecParameters *par = st->codecpar;
+        const AVCodecDescriptor *desc = avcodec_descriptor_get(par->codec_id);
         if (par->codec_type != type)
             continue;
+        if (desc && (desc->props & AV_CODEC_PROP_ENHANCEMENT))
+            continue;
         if (wanted_stream_nb >= 0 && real_stream_index != wanted_stream_nb)
             continue;
         if (type == AVMEDIA_TYPE_AUDIO && !(par->ch_layout.nb_channels && 
par->sample_rate))

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