[FFmpeg-cvslog] avfilter/af_afftfilt: add missing error check
Paul B Mahol
git at videolan.org
Mon Nov 20 14:54:57 EET 2017
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov 20 13:42:59 2017 +0100| [5c7c0c5b580ea26c1aa83f94ec500105b5c07c31] | committer: Paul B Mahol
avfilter/af_afftfilt: add missing error check
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c7c0c5b580ea26c1aa83f94ec500105b5c07c31
---
libavfilter/af_afftfilt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c
index 52755a1fb4..7f28e1f77b 100644
--- a/libavfilter/af_afftfilt.c
+++ b/libavfilter/af_afftfilt.c
@@ -197,8 +197,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
int ch, n, ret, i, j, k;
int start = s->start, end = s->end;
- av_audio_fifo_write(s->fifo, (void **)frame->extended_data, frame->nb_samples);
+ ret = av_audio_fifo_write(s->fifo, (void **)frame->extended_data, frame->nb_samples);
av_frame_free(&frame);
+ if (ret < 0)
+ return ret;
while (av_audio_fifo_size(s->fifo) >= window_size) {
if (!in) {
@@ -316,7 +318,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
av_frame_free(&in);
- return ret;
+ return ret < 0 ? ret : 0;
}
static int query_formats(AVFilterContext *ctx)
More information about the ffmpeg-cvslog
mailing list