Commit eec55e62 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg_opt: Dont exit on avformat_find_stream_info() failure if there are streams

This allows "-codec copy -f framecrc" on files with only unindentifyable streams
Reviewed-by: 's avatarStefano Sabatini <stefasab@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1d54f510
...@@ -888,8 +888,10 @@ static int open_input_file(OptionsContext *o, const char *filename) ...@@ -888,8 +888,10 @@ static int open_input_file(OptionsContext *o, const char *filename)
ret = avformat_find_stream_info(ic, opts); ret = avformat_find_stream_info(ic, opts);
if (ret < 0) { if (ret < 0) {
av_log(NULL, AV_LOG_FATAL, "%s: could not find codec parameters\n", filename); av_log(NULL, AV_LOG_FATAL, "%s: could not find codec parameters\n", filename);
avformat_close_input(&ic); if (ic->nb_streams == 0) {
exit_program(1); avformat_close_input(&ic);
exit_program(1);
}
} }
timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time; timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment