summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showwaves.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-11-06 22:43:51 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-11-06 22:48:17 +0100
commit5f634480d1c4ed7711a15d1be07e49177cf351c1 (patch)
treeadd10d52d83dfff46ca0476144f7ad40b5c7fc81 /libavfilter/avf_showwaves.c
parente9b8523d52ca84d5012168db24fec2d50e73cf22 (diff)
lavfi/showwaves: simplify check in filter_samples()
Also fix Coverity issue CID 733743: Dereference after null check
Diffstat (limited to 'libavfilter/avf_showwaves.c')
-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 7f058e1747..e5263245f7 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);