ffmpeg | branch: master | Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> | Sat Feb 28 23:15:39 2015 +0100| [dcf19008a67f35ae817a7af65ce2625a82acb641] | committer: Michael Niedermayer
avfilter/af_volume: fix precision=fixed and volume=0 case When precision is fixed and volume is 0, filter_frame does not perform any operation on the output buffer. This works if the output buffer has been allocated and zeroed with ff_get_audio_buffer but not if the input buffer is used as output buffer. Fix this by not using the input buffer as output buffer if precision is fixed and volume is 0. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dcf19008a67f35ae817a7af65ce2625a82acb641 --- libavfilter/af_volume.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 4809ae7..8d49c65 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -402,7 +402,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) } /* do volume scaling in-place if input buffer is writable */ - if (av_frame_is_writable(buf)) { + if (av_frame_is_writable(buf) + && (vol->precision != PRECISION_FIXED || vol->volume_i > 0)) { out_buf = buf; } else { out_buf = ff_get_audio_buffer(inlink, nb_samples); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog