summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showvolume.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/avf_showvolume.c')
-rw-r--r--libavfilter/avf_showvolume.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c
index 24d42d030d..fa64d5237a 100644
--- a/libavfilter/avf_showvolume.c
+++ b/libavfilter/avf_showvolume.c
@@ -324,7 +324,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
AVFilterLink *outlink = ctx->outputs[0];
ShowVolumeContext *s = ctx->priv;
const int step = s->step;
- int c, j, k, max_draw;
+ int c, j, k, max_draw, ret;
char channel_name[64];
AVFrame *out;
@@ -434,7 +434,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
out = av_frame_clone(s->out);
if (!out)
return AVERROR(ENOMEM);
- av_frame_make_writable(out);
+ ret = ff_inlink_make_frame_writable(outlink, &out);
+ if (ret < 0) {
+ av_frame_free(&out);
+ return ret;
+ }
/* draw volume level */
for (c = 0; c < inlink->ch_layout.nb_channels && s->h >= 8 && s->draw_volume; c++) {