[FFmpeg-devel] [PATCH 2/7] lavfi: add a frame_rate field to AVFilterLink.
Michael Niedermayer
michaelni at gmx.at
Tue Jun 5 14:19:09 CEST 2012
On Tue, Jun 05, 2012 at 01:23:02PM +0200, Nicolas George wrote:
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/avfilter.c | 3 +++
> libavfilter/avfilter.h | 7 +++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index 041ba1b..e5b3e8f 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -242,6 +242,9 @@ int avfilter_config_links(AVFilterContext *filter)
> link->sample_aspect_ratio = inlink ?
> inlink->sample_aspect_ratio : (AVRational){1,1};
>
> + if (inlink && !link->frame_rate.num && !link->frame_rate.den)
> + link->frame_rate = inlink->frame_rate;
> +
> if (inlink) {
> if (!link->w)
> link->w = inlink->w;
> diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
> index 10803c5..2017365 100644
> --- a/libavfilter/avfilter.h
> +++ b/libavfilter/avfilter.h
> @@ -757,6 +757,13 @@ struct AVFilterLink {
> */
> int age_index;
>
> + /**
> + * Frame rate of the stream on the link, or 1/0 if unknown;
> + * if left to 0/0, will be automatically be copied from the first input
> + * of the source filter if it exists.
> + */
> + AVRational frame_rate;
good idea but in lavf there are 2 frame rate fields and the meaning
of this is in relation to them is ambigous
theres a avg_frame_rate and r_frame_rate.
otherwise LGTM
thanks!
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120605/caa01874/attachment.asc>
More information about the ffmpeg-devel
mailing list