[FFmpeg-cvslog] ffmpeg_filter: do not pick evil path for trim filters

Paul B Mahol git at videolan.org
Mon Aug 12 14:51:26 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jul 12 21:40:58 2013 +0000| [d4ab1292e9ac3a13a33d5405d8538b27a56fa7fd] | committer: Paul B Mahol

ffmpeg_filter: do not pick evil path for trim filters

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index e17c4a5..4f1e572 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -302,11 +302,11 @@ static int insert_trim(int64_t start_time, int64_t duration,
         return AVERROR(ENOMEM);
 
     if (duration != INT64_MAX) {
-        ret = av_opt_set_double(ctx, "duration", (double)duration / 1e6,
+        ret = av_opt_set_int(ctx, "durationi", duration,
                                 AV_OPT_SEARCH_CHILDREN);
     }
     if (ret >= 0 && start_time != AV_NOPTS_VALUE) {
-        ret = av_opt_set_double(ctx, "start", (double)start_time / 1e6,
+        ret = av_opt_set_int(ctx, "starti", start_time,
                                 AV_OPT_SEARCH_CHILDREN);
     }
     if (ret < 0) {



More information about the ffmpeg-cvslog mailing list