[FFmpeg-cvslog] lavfi/showwaves: simplify check in filter_samples()
Stefano Sabatini
git at videolan.org
Tue Nov 6 22:50:29 CET 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Nov 6 22:43:51 2012 +0100| [5f634480d1c4ed7711a15d1be07e49177cf351c1] | committer: Stefano Sabatini
lavfi/showwaves: simplify check in filter_samples()
Also fix Coverity issue CID 733743: Dereference after null check
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f634480d1c4ed7711a15d1be07e49177cf351c1
---
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 7f058e1..e526324 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -195,7 +195,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
/* draw data in the buffer */
for (i = 0; i < nb_samples; i++) {
- if (showwaves->buf_idx == 0 && showwaves->sample_count_mod == 0) {
+ if (!outpicref) {
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