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

Paul B Mahol onemda at gmail.com
Fri Jul 12 23:41:51 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 ffmpeg_filter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 1fe2106..d2a83a8 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -307,11 +307,11 @@ static int insert_trim(OutputStream *ost, AVFilterContext **last_filter, int *pa
         return AVERROR(ENOMEM);
 
     if (of->recording_time != INT64_MAX) {
-        ret = av_opt_set_double(ctx, "duration", (double)of->recording_time / 1e6,
+        ret = av_opt_set_int(ctx, "durationi", of->recording_time,
                                 AV_OPT_SEARCH_CHILDREN);
     }
     if (ret >= 0 && of->start_time) {
-        ret = av_opt_set_double(ctx, "start", (double)of->start_time / 1e6,
+        ret = av_opt_set_int(ctx, "starti", of->start_time,
                                 AV_OPT_SEARCH_CHILDREN);
     }
     if (ret < 0) {
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list