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: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/76/merge
Michael Niedermayer 11 years ago
parent 1d54f51084
commit eec55e622a
  1. 6
      ffmpeg_opt.c

@ -888,8 +888,10 @@ static int open_input_file(OptionsContext *o, const char *filename)
ret = avformat_find_stream_info(ic, opts);
if (ret < 0) {
av_log(NULL, AV_LOG_FATAL, "%s: could not find codec parameters\n", filename);
avformat_close_input(&ic);
exit_program(1);
if (ic->nb_streams == 0) {
avformat_close_input(&ic);
exit_program(1);
}
}
timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time;

Loading…
Cancel
Save