From 56ee3f9de7b9f6090d599a27d33a392890a2f7b8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 15 Jun 2013 09:35:10 +0200 Subject: avconv: distinguish between -ss 0 and -ss not being used Using -ss 0 to drop frames with negative timestamps is a perfectly valid use case. --- avconv_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'avconv_filter.c') diff --git a/avconv_filter.c b/avconv_filter.c index 15c7defab9..0e276506f9 100644 --- a/avconv_filter.c +++ b/avconv_filter.c @@ -183,7 +183,7 @@ static int insert_trim(OutputStream *ost, AVFilterContext **last_filter, int *pa char filter_name[128]; int ret = 0; - if (of->recording_time == INT64_MAX && !of->start_time) + if (of->recording_time == INT64_MAX && of->start_time == AV_NOPTS_VALUE) return 0; trim = avfilter_get_by_name(name); @@ -203,7 +203,7 @@ static int insert_trim(OutputStream *ost, AVFilterContext **last_filter, int *pa ret = av_opt_set_double(ctx, "duration", (double)of->recording_time / 1e6, AV_OPT_SEARCH_CHILDREN); } - if (ret >= 0 && of->start_time) { + if (ret >= 0 && of->start_time != AV_NOPTS_VALUE) { ret = av_opt_set_double(ctx, "start", (double)of->start_time / 1e6, AV_OPT_SEARCH_CHILDREN); } -- cgit v1.2.3