From 55d430e74c02d22db3a91766bf61f6c73f1c72a3 Mon Sep 17 00:00:00 2001 From: odrling Date: Fri, 2 Aug 2024 21:21:48 +0200 Subject: [PATCH] always call avformat_find_stream_info having no streams was not a defining factor it would seem --- libdakara_check.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libdakara_check.c b/libdakara_check.c index 72221dc..09a6408 100644 --- a/libdakara_check.c +++ b/libdakara_check.c @@ -29,13 +29,12 @@ static void dakara_check_avf(AVFormatContext *s, dakara_check_results *res) { unsigned int audio_streams = 0; int64_t duration = 0; - if (s->nb_streams == 0) { - // mpeg probably - if (avformat_find_stream_info(s, NULL) < 0) { - perror("failed to find streams"); - res->report.errors.io_error = true; - return; - } + + // needed for mpeg-ts files + if (avformat_find_stream_info(s, NULL) < 0) { + perror("failed to find streams"); + res->report.errors.io_error = true; + return; } for (unsigned int ui = 0; ui < s->nb_streams; ui++) {