diff options
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r-- | ffmpeg_filter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index 9f9544bc80..1270ffb615 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -286,11 +286,11 @@ 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; // Use with duration and without output starttime is buggy with trim filters - if (!of->start_time) + if (of->start_time == AV_NOPTS_VALUE) return 0; trim = avfilter_get_by_name(name); @@ -310,7 +310,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); } |