mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
buffersrc: accept the frame rate as argument.
(cherry picked from ffmpeg commit 9ca440679dc535b31edd569393d8d3dda59db90e) Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
48ff6683ba
commit
61fb67dcb2
@ -44,6 +44,7 @@ typedef struct BufferSourceContext {
|
|||||||
const AVClass *class;
|
const AVClass *class;
|
||||||
AVFifoBuffer *fifo;
|
AVFifoBuffer *fifo;
|
||||||
AVRational time_base; ///< time_base to set in the output link
|
AVRational time_base; ///< time_base to set in the output link
|
||||||
|
AVRational frame_rate; ///< frame_rate to set in the output link
|
||||||
|
|
||||||
/* video only */
|
/* video only */
|
||||||
int h, w;
|
int h, w;
|
||||||
@ -191,6 +192,7 @@ static const AVOption video_options[] = {
|
|||||||
#endif
|
#endif
|
||||||
{ "sar", "sample aspect ratio", OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 1 }, 0, DBL_MAX, V },
|
{ "sar", "sample aspect ratio", OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 1 }, 0, DBL_MAX, V },
|
||||||
{ "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
|
{ "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
|
||||||
|
{ "frame_rate", NULL, OFFSET(frame_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -308,6 +310,7 @@ static int config_props(AVFilterLink *link)
|
|||||||
}
|
}
|
||||||
|
|
||||||
link->time_base = c->time_base;
|
link->time_base = c->time_base;
|
||||||
|
link->frame_rate = c->frame_rate;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user