lavfi/showwaves: fix check on showwaves->outpicref
authorStefano Sabatini <stefasab@gmail.com>
Tue, 22 Jan 2013 11:18:52 +0000 (12:18 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Tue, 22 Jan 2013 19:34:29 +0000 (20:34 +0100)
outpicref is not always in synch with showwaves->outpicref, which is
changed as a side effect of the call to functions.

Fix regression introduced in 5f634480d1c4ed7711a15d1be07e49177cf351c1,
+10l to me.

libavfilter/avf_showwaves.c

index 3e5f39f..20f127e 100644 (file)
@@ -193,7 +193,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *insamples)
 
     /* draw data in the buffer */
     for (i = 0; i < nb_samples; i++) {
-        if (!outpicref) {
+        if (!showwaves->outpicref) {
             showwaves->outpicref = outpicref =
                 ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_ALIGN,
                                     outlink->w, outlink->h);