diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-28 16:39:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-28 16:43:34 +0100 |
commit | 3ed483cdfa5bc9800702a4a505b7164e70b1bcd6 (patch) | |
tree | 199776884982bc63a621a18035e45ebcb60953fa /libavfilter/audio.c | |
parent | a0b8eec719323bc242e47ab891af47cfd8f06aec (diff) | |
download | ffmpeg-3ed483cdfa5bc9800702a4a505b7164e70b1bcd6.tar.gz |
libavfilter: Support using filter_frame for video
With this we can mix filters using filter_frame OR start/draw_slice/end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/audio.c')
-rw-r--r-- | libavfilter/audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/audio.c b/libavfilter/audio.c index 5389011f62..f157e877cd 100644 --- a/libavfilter/audio.c +++ b/libavfilter/audio.c @@ -162,7 +162,7 @@ static int default_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame) return ff_filter_frame(link->dst->outputs[0], frame); } -int ff_filter_frame_framed(AVFilterLink *link, AVFilterBufferRef *samplesref) +int ff_filter_samples_framed(AVFilterLink *link, AVFilterBufferRef *samplesref) { int (*filter_frame)(AVFilterLink *, AVFilterBufferRef *); AVFilterPad *src = link->srcpad; @@ -217,7 +217,7 @@ int ff_filter_frame_framed(AVFilterLink *link, AVFilterBufferRef *samplesref) return ret; } -int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *samplesref) +int ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) { int insamples = samplesref->audio->nb_samples, inpos = 0, nb_samples; AVFilterBufferRef *pbuf = link->partial_buf; @@ -231,7 +231,7 @@ int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *samplesref) if (!link->min_samples || (!pbuf && insamples >= link->min_samples && insamples <= link->max_samples)) { - return ff_filter_frame_framed(link, samplesref); + return ff_filter_samples_framed(link, samplesref); } /* Handle framing (min_samples, max_samples) */ while (insamples) { @@ -258,7 +258,7 @@ int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *samplesref) insamples -= nb_samples; pbuf->audio->nb_samples += nb_samples; if (pbuf->audio->nb_samples >= link->min_samples) { - ret = ff_filter_frame_framed(link, pbuf); + ret = ff_filter_samples_framed(link, pbuf); pbuf = NULL; } } |