Skip to content

Commit

Permalink
always call avformat_find_stream_info
Browse files Browse the repository at this point in the history
having no streams was not a defining factor it would seem
  • Loading branch information
odrling committed Aug 2, 2024
1 parent 06962a9 commit 55d430e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions libdakara_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 55d430e

Please sign in to comment.