[FFmpeg-cvslog] showwaves: fix first sample of frame test.
Nicolas George
git at videolan.org
Sat Jun 23 15:27:34 CEST 2012
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sat Jun 23 11:50:19 2012 +0200| [6d627eae3cd5ff80382b76a67a596caf48869715] | committer: Nicolas George
showwaves: fix first sample of frame test.
Avoids a huge memleak when n != 1.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d627eae3cd5ff80382b76a67a596caf48869715
---
libavfilter/avf_showwaves.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 645065f..90d3ec9 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);
More information about the ffmpeg-cvslog
mailing list