lavfi/volume: fix NULL reference in filter_frame()
authorStefano Sabatini <stefasab@gmail.com>
Wed, 25 Dec 2013 18:13:23 +0000 (19:13 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 25 Dec 2013 18:13:23 +0000 (19:13 +0100)
Fix crash.

libavfilter/af_volume.c

index 454d462..269a2a5 100644 (file)
@@ -387,7 +387,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
         av_frame_free(&buf);
 
 end:
-    vol->var_values[VAR_NB_CONSUMED_SAMPLES] += buf->nb_samples;
+    vol->var_values[VAR_NB_CONSUMED_SAMPLES] += out_buf->nb_samples;
     return ff_filter_frame(outlink, out_buf);
 }