diff options
author | Nicolas George <george@nsup.org> | 2015-10-22 09:57:34 +0200 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2015-11-07 16:43:36 +0100 |
commit | 67d3f5296ea6dce884ac53f2ea37f45dabaa8bb3 (patch) | |
tree | 6a6531fb0f61337581a45a8236ab1cc2025ba99a /libavfilter/fifo.c | |
parent | 79c1be124e59575fa0dc2bc16eca07553e6758b4 (diff) | |
download | ffmpeg-67d3f5296ea6dce884ac53f2ea37f45dabaa8bb3.tar.gz |
lavfi/fifo: do not assume request_frame() returns a frame.
Diffstat (limited to 'libavfilter/fifo.c')
-rw-r--r-- | libavfilter/fifo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index e477cff4cd..f0b77ffb34 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -201,7 +201,8 @@ static int return_audio_frame(AVFilterContext *ctx) break; } else if (ret < 0) return ret; - av_assert0(s->root.next); // If ff_request_frame() succeeded then we should have a frame + if (!s->root.next) + return 0; } head = s->root.next->frame; @@ -237,7 +238,8 @@ static int request_frame(AVFilterLink *outlink) return return_audio_frame(outlink->src); return ret; } - av_assert0(fifo->root.next); + if (!fifo->root.next) + return 0; } if (outlink->request_samples) { |