aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-10-09 16:28:30 +0200
committerJanne Grunau <janne-libav@jannau.net>2012-10-09 18:43:30 +0200
commitac9a89562adcc09d213462830f4da728674958fb (patch)
treee37671bff48c19ab93d4e58e50acb51a0b6702a2
parent8501c098687bbf551a2f1cdef80ee653fdfff6ac (diff)
downloadffmpeg-ac9a89562adcc09d213462830f4da728674958fb.tar.gz
af_resample: unref out_buf when avresample_convert returns 0
Fixes CID732273.
-rw-r--r--libavfilter/af_resample.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c
index 58a9b2a99e..c43d260610 100644
--- a/libavfilter/af_resample.c
+++ b/libavfilter/af_resample.c
@@ -194,9 +194,10 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
buf_out->linesize[0], nb_samples,
buf->extended_data, buf->linesize[0],
buf->audio->nb_samples);
- if (ret < 0) {
+ if (ret <= 0) {
avfilter_unref_buffer(buf_out);
- goto fail;
+ if (ret < 0)
+ goto fail;
}
av_assert0(!avresample_available(s->avr));