summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-06-23 11:50:19 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-06-23 15:08:22 +0200
commit6d627eae3cd5ff80382b76a67a596caf48869715 (patch)
treebcb5162a160935ddf67d5fcf4508251b8d950b42 /libavfilter
parentbd9939f4951d9069d96b771e253f20534541aeb4 (diff)
showwaves: fix first sample of frame test.
Avoids a huge memleak when n != 1.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showwaves.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 645065f33d..90d3ec9441 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -196,7 +196,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
/* draw data in the buffer */
for (i = 0; i < nb_samples; i++) {
- if (showwaves->buf_idx == 0) {
+ if (showwaves->buf_idx == 0 && showwaves->sample_count_mod == 0) {
showwaves->outpicref = outpicref =
ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_ALIGN,
outlink->w, outlink->h);