Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-06-05 14:40:37 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-06-09 10:42:50 +0400
commit283cc059386781b6fb90b9e5496d8963c3e416af (patch)
tree4431b55762bbec63ed6b80c195acfce14b5dfd07 /libavfilter
parent7b42036b3b23c85f473bf9369e37fa8da22eaf93 (diff)
buffersink: add av_buffersink_get_frame_rate().
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/buffersink.h5
-rw-r--r--libavfilter/sink_buffer.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h
index 46de82be6d..97729bc7a9 100644
--- a/libavfilter/buffersink.h
+++ b/libavfilter/buffersink.h
@@ -133,4 +133,9 @@ int av_buffersink_read(AVFilterContext *sink, AVFilterBufferRef **buf);
int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
int nb_samples);
+/**
+ * Get the frame rate of the input.
+ */
+AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx);
+
#endif /* AVFILTER_BUFFERSINK_H */
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c
index d83f21ba61..d1a72e4081 100644
--- a/libavfilter/sink_buffer.c
+++ b/libavfilter/sink_buffer.c
@@ -142,6 +142,11 @@ int av_buffersink_get_buffer_ref(AVFilterContext *ctx,
return 0;
}
+AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx)
+{
+ return ctx->inputs[0]->frame_rate;
+}
+
int av_buffersink_poll_frame(AVFilterContext *ctx)
{
BufferSinkContext *buf = ctx->priv;