From d3de184d2283997494cb936a1ae3869873938452 Mon Sep 17 00:00:00 2001 From: odrling Date: Sat, 10 Aug 2024 23:34:19 +0200 Subject: [PATCH] ignore attached pictures as video track --- libdakara_check.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libdakara_check.c b/libdakara_check.c index 93dfb84..54ded92 100644 --- a/libdakara_check.c +++ b/libdakara_check.c @@ -45,6 +45,9 @@ static void dakara_check_avf(AVFormatContext *s, dakara_check_results *res) { switch (par->codec_type) { case AVMEDIA_TYPE_VIDEO: + if (st->disposition & AV_DISPOSITION_ATTACHED_PIC) { + break; + } if (duration <= 0) duration = st->duration * st->time_base.num / st->time_base.den; if (video_streams++ > 0) { @@ -180,10 +183,18 @@ char const *dakara_check_str_report(union dakara_check_results_report *report) { report->errors.too_many_video_streams = false; return "too many video tracks"; } + if (report->errors.no_video_stream) { + report->errors.no_video_stream = false; + return "no video track found"; + } if (report->errors.too_many_audio_streams) { report->errors.too_many_audio_streams = false; return "too many audio tracks"; } + if (report->errors.no_audio_stream) { + report->errors.no_audio_stream = false; + return "no audio track found"; + } if (report->errors.unknown_stream) { report->errors.unknown_stream = false; return "found an unknown track";