diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-06-25 02:30:15 +0400 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-06-30 16:03:54 +0400 |
commit | 1f5c1333a733a7cba1803c9f9eab86da5f010bd5 (patch) | |
tree | 878a452703b4b0e088266a13edd3cbbcecac2ca2 /libavfilter/sink_buffer.c | |
parent | 0689d5e17ac0a3269c604b4df2c01140be328647 (diff) |
sink_buffer: implement fixed frame size.
Diffstat (limited to 'libavfilter/sink_buffer.c')
-rw-r--r-- | libavfilter/sink_buffer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c index 4db874fdfa..2f3dff84ff 100644 --- a/libavfilter/sink_buffer.c +++ b/libavfilter/sink_buffer.c @@ -125,6 +125,14 @@ static void end_frame(AVFilterLink *inlink) } } +void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size) +{ + AVFilterLink *inlink = ctx->inputs[0]; + + inlink->min_samples = inlink->max_samples = + inlink->partial_buf_size = frame_size; +} + int av_buffersink_get_buffer_ref(AVFilterContext *ctx, AVFilterBufferRef **bufref, int flags) { |