[FFmpeg-cvslog] ffmpeg_opt: Dont exit on avformat_find_stream_info() failure if there are streams
Michael Niedermayer
git at videolan.org
Wed Jun 18 22:47:53 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun 10 17:51:58 2014 +0200| [eec55e622a73b298bd8872a82dc116b3633c14e4] | committer: 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: Stefano Sabatini <stefasab at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eec55e622a73b298bd8872a82dc116b3633c14e4
---
ffmpeg_opt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 887752d..f7473fa 100644
--- a/ffmpeg_opt.c
+++ b/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;
More information about the ffmpeg-cvslog
mailing list