summaryrefslogtreecommitdiff
path: root/avconv_filter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-06-15 09:35:10 +0200
committerAnton Khirnov <anton@khirnov.net>2013-08-05 10:53:12 +0200
commit56ee3f9de7b9f6090d599a27d33a392890a2f7b8 (patch)
tree258b51993ad04a6a4cede741022b1d19f5a7b2f4 /avconv_filter.c
parent2e661f26f8b12195f75ae3b07d9591e395135bc7 (diff)
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.
Diffstat (limited to 'avconv_filter.c')
-rw-r--r--avconv_filter.c4
1 files changed, 2 insertions, 2 deletions
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);
}