[FFmpeg-cvslog] vsrc_buffer: fix null ptr segfault
Michael Niedermayer
git at videolan.org
Tue Apr 17 04:51:58 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr 17 03:19:57 2012 +0200| [5cd460ba63fa78aa8c61e7e5c43da194b0505717] | committer: Michael Niedermayer
vsrc_buffer: fix null ptr segfault
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5cd460ba63fa78aa8c61e7e5c43da194b0505717
---
libavfilter/vsrc_buffer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c
index d003add..ba00b2b 100644
--- a/libavfilter/vsrc_buffer.c
+++ b/libavfilter/vsrc_buffer.c
@@ -209,7 +209,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
static av_cold void uninit(AVFilterContext *ctx)
{
BufferSourceContext *s = ctx->priv;
- while (av_fifo_size(s->fifo)) {
+ while (s->fifo && av_fifo_size(s->fifo)) {
AVFilterBufferRef *buf;
av_fifo_generic_read(s->fifo, &buf, sizeof(buf), NULL);
avfilter_unref_buffer(buf);
More information about the ffmpeg-cvslog
mailing list