]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_volume.c
Merge commit '25f613f8be3b51e4396b93cda131e4631ba54302'
[ffmpeg] / libavfilter / af_volume.c
index 4809ae77ddc9ba6428319f7e945c43be5aa1e996..8d49c65163b874dde5be1cbd6b95ae1fbcf8bf7b 100644 (file)
@@ -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);