Merge commit '56ee3f9de7b9f6090d599a27d33a392890a2f7b8'

* commit '56ee3f9de7b9f6090d599a27d33a392890a2f7b8':
  avconv: distinguish between -ss 0 and -ss not being used

Conflicts:
	ffmpeg.c
	ffmpeg_opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-08-06 10:25:32 +02:00
3 changed files with 22 additions and 15 deletions

View File

@ -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);
}