History

lavf/vf_setpts: unset output framerate

This filter produces VFR output in general. Avoids dropping frames in the setpts test.

Anton Khirnov committed 2 years ago

Commit f121d951 parent c240ff92 files · +67 −39Browse files

Showing the changes to libavfilter (1 of 2 files). Show all

Unified · Split

libavfilter/setpts.c+16−1
@@ -150,6 +150,13 @@ static int config_input(AVFilterLink *inlink) · 149 unmodified lines
150 return 0;150 return 0;
151}151}
152 152
153static int config_output_video(AVFilterLink *outlink)
154{
155 outlink->frame_rate = (AVRational){ 1, 0 };
156
157 return 0;
158}
159
153#define BUF_SIZE 64160#define BUF_SIZE 64
154 161
155static inline char *double2int64str(char *buf, double v)162static inline char *double2int64str(char *buf, double v)
@@ -322,6 +329,14 @@ static const AVFilterPad avfilter_vf_setpts_inputs[] = { · 166 unmodified lines
322 },329 },
323};330};
324 331
332static const AVFilterPad outputs_video[] = {
333 {
334 .name = "default",
335 .type = AVMEDIA_TYPE_VIDEO,
336 .config_props = config_output_video,
337 },
338};
339
325const AVFilter ff_vf_setpts = {340const AVFilter ff_vf_setpts = {
326 .name = "setpts",341 .name = "setpts",
327 .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."),342 .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."),
@@ -335,7 +350,7 @@ const AVFilter ff_vf_setpts = { · 7 unmodified lines
335 .priv_class = &setpts_class,350 .priv_class = &setpts_class,
336 351
337 FILTER_INPUTS(avfilter_vf_setpts_inputs),352 FILTER_INPUTS(avfilter_vf_setpts_inputs),
338 FILTER_OUTPUTS(ff_video_default_filterpad),353 FILTER_OUTPUTS(outputs_video),
339};354};
340#endif /* CONFIG_SETPTS_FILTER */355#endif /* CONFIG_SETPTS_FILTER */
341 356

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t