[FFmpeg-cvslog] ffmpeg_opt: abort if -to <= -ss

Simon Thelen git at videolan.org
Sat Oct 11 22:32:07 CEST 2014


ffmpeg | branch: master | Simon Thelen <ffmpeg-dev at c-14.de> | Fri Oct 10 23:04:01 2014 +0200| [8c4ca4aa5aa998e31337e30ff30ebf48f534acc2] | committer: Michael Niedermayer

ffmpeg_opt: abort if -to <= -ss

Makes ffmpeg abort instead of continuing when stop_time <= start_time.

Closes ticket #4015.

Signed-off-by: Simon Thelen <ffmpeg-dev at c-14.de>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c4ca4aa5aa998e31337e30ff30ebf48f534acc2
---

 ffmpeg_opt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 10aaa3a..c518ae1 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1732,8 +1732,8 @@ static int open_output_file(OptionsContext *o, const char *filename)
     if (o->stop_time != INT64_MAX && o->recording_time == INT64_MAX) {
         int64_t start_time = o->start_time == AV_NOPTS_VALUE ? 0 : o->start_time;
         if (o->stop_time <= start_time) {
-            av_log(NULL, AV_LOG_WARNING, "-to value smaller than -ss; ignoring -to.\n");
-            o->stop_time = INT64_MAX;
+            av_log(NULL, AV_LOG_ERROR, "-to value smaller than -ss; aborting.\n");
+            exit_program(1);
         } else {
             o->recording_time = o->stop_time - start_time;
         }



More information about the ffmpeg-cvslog mailing list