ffmpeg_filter: do not pick evil path for trim filters
authorPaul B Mahol <onemda@gmail.com>
Fri, 12 Jul 2013 21:40:58 +0000 (21:40 +0000)
committerPaul B Mahol <onemda@gmail.com>
Mon, 12 Aug 2013 10:59:09 +0000 (10:59 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
ffmpeg_filter.c

index e17c4a5..4f1e572 100644 (file)
@@ -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) {