diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 3e945d6e91..405a9c2c2f 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -338,8 +338,8 @@ static int channelmap_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *bu if (buf->extended_data == buf->data) { buf->extended_data = new_extended_data; } else { - buf->extended_data = new_extended_data; av_free(buf->extended_data); + buf->extended_data = new_extended_data; } } else if (buf->extended_data != buf->data) { av_free(buf->extended_data);