[FFmpeg-cvslog] lavfi/showwaves: do not set on outlink->out_buf the sent video frame

Stefano Sabatini git at videolan.org
Mon Jul 23 15:14:38 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Jul 23 14:57:15 2012 +0200| [7afd42d9f26be1e95f15cbcfa0e09308a6591036] | committer: Stefano Sabatini

lavfi/showwaves: do not set on outlink->out_buf the sent video frame

The video frame reference is passed along the filterchain, and is not
possessed anymore by the filter. If out_buf is not set to NULL, it will
be freed by ff_end_frame() causing a crash.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7afd42d9f26be1e95f15cbcfa0e09308a6591036
---

 libavfilter/avf_showwaves.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 3939fe5..96ed2c7 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -206,7 +206,6 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
                              av_rescale_q((p - (int16_t *)insamples->data[0]) / nb_channels,
                                           (AVRational){ 1, inlink->sample_rate },
                                           outlink->time_base);
-            outlink->out_buf = outpicref;
             linesize = outpicref->linesize[0];
             memset(outpicref->data[0], 0, showwaves->h*linesize);
         }



More information about the ffmpeg-cvslog mailing list