You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
buffersrc: fix invalid read in uninit if the fifo hasn't been allocated
This commit is contained in:
@ -137,7 +137,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
|||||||
static av_cold void uninit(AVFilterContext *ctx)
|
static av_cold void uninit(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
BufferSourceContext *s = ctx->priv;
|
BufferSourceContext *s = ctx->priv;
|
||||||
while (av_fifo_size(s->fifo)) {
|
while (s->fifo && av_fifo_size(s->fifo)) {
|
||||||
AVFilterBufferRef *buf;
|
AVFilterBufferRef *buf;
|
||||||
av_fifo_generic_read(s->fifo, &buf, sizeof(buf), NULL);
|
av_fifo_generic_read(s->fifo, &buf, sizeof(buf), NULL);
|
||||||
avfilter_unref_buffer(buf);
|
avfilter_unref_buffer(buf);
|
||||||
|
Reference in New Issue
Block a user