summaryrefslogtreecommitdiff
path: root/avconv_filter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-15 06:50:47 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-22 19:08:12 +0200
commitb0f36a0043d76436cc7ab8ff92ab99c94595d3c0 (patch)
tree3ec757cccb2461896db85bb27cee91e5a0a1e727 /avconv_filter.c
parent9064777dbb335ab4809ae09e3fdcc0245f925cdc (diff)
avconv: stop using setpts for input framerate forced with -r
The setpts filter does not signal to the rest of the filtergraph that the stream is CFR. Just generate the timestamps manually instead.
Diffstat (limited to 'avconv_filter.c')
-rw-r--r--avconv_filter.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/avconv_filter.c b/avconv_filter.c
index 96277f80eb..b78d3bdb94 100644
--- a/avconv_filter.c
+++ b/avconv_filter.c
@@ -519,6 +519,8 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
par->height = ifilter->height;
par->format = ifilter->format;
par->time_base = tb;
+ if (ist->framerate.num)
+ par->frame_rate = ist->framerate;
par->hw_frames_ctx = ifilter->hw_frames_ctx;
ret = av_buffersrc_parameters_set(ifilter->filter, par);
@@ -552,23 +554,6 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
}
}
- if (ist->framerate.num) {
- AVFilterContext *setpts;
-
- snprintf(name, sizeof(name), "force CFR for input from stream %d:%d",
- ist->file_index, ist->st->index);
- if ((ret = avfilter_graph_create_filter(&setpts,
- avfilter_get_by_name("setpts"),
- name, "N", NULL,
- fg->graph)) < 0)
- return ret;
-
- if ((ret = avfilter_link(last_filter, 0, setpts, 0)) < 0)
- return ret;
-
- last_filter = setpts;
- }
-
snprintf(name, sizeof(name), "trim for input stream %d:%d",
ist->file_index, ist->st->index);
ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ?