Skip to content

Commit

Permalink
fix(concat): skip input file instead of crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Jan 13, 2024
1 parent b0167e8 commit 6491a9d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions video/concat/concat.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@ int concat(const char *output_file, size_t input_files_count,
int stream_index = 0;

if ((ret = avformat_open_input(&ifmt_ctx, input_file, 0, 0)) < 0) {
fprintf(stderr, "Could not open input file '%s': %s\n", input_file,
av_err2str(ret));
goto end;
fprintf(stderr, "Could not open input file '%s': %s, skipping...\n",
input_file, av_err2str(ret));
continue;
}

// Retrieve input stream information
if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) < 0) {
fprintf(stderr, "Failed to retrieve input stream information: %s\n",
fprintf(stderr,
"Failed to retrieve input stream information: %s, skipping...\n",
av_err2str(ret));
goto end;
continue;
}

av_dump_format(ifmt_ctx, 0, input_file, 0);
Expand Down

0 comments on commit 6491a9d

Please sign in to comment.