[FFmpeg-devel] [PATCH 2/7] lavfi: add a frame_rate field to AVFilterLink.
Nicolas George
nicolas.george at normalesup.org
Tue Jun 5 13:23:02 CEST 2012
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;
+
};
/**
--
1.7.10
More information about the ffmpeg-devel
mailing list