X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fbuffersink.c;h=3206bd9dfe406141901e8f6a215d0655009d7fc5;hb=0701ff2c321e7628daafc6c916ee283b757b08e1;hp=de48b3d579ee5e878ef65adb3fe88ee911651514;hpb=696634c5fa5894b4adeb240191a723ec77a30756;p=ffmpeg diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index de48b3d579e..3206bd9dfe4 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -133,7 +133,7 @@ int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFr AVFrame *cur_frame; /* no picref available, fetch it from the filterchain */ - if (!av_fifo_size(buf->fifo)) { + while (!av_fifo_size(buf->fifo)) { if (inlink->closed) return AVERROR_EOF; if (flags & AV_BUFFERSINK_FLAG_NO_REQUEST) @@ -142,9 +142,6 @@ int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFr return ret; } - if (!av_fifo_size(buf->fifo)) - return AVERROR(EINVAL); - if (flags & AV_BUFFERSINK_FLAG_PEEK) { cur_frame = *((AVFrame **)av_fifo_peek2(buf->fifo, 0)); if ((ret = av_frame_ref(frame, cur_frame)) < 0) @@ -404,7 +401,7 @@ static const AVOption abuffersink_options[] = { { "sample_rates", "set the supported sample rates", OFFSET(sample_rates), AV_OPT_TYPE_BINARY, .flags = FLAGS }, { "channel_layouts", "set the supported channel layouts", OFFSET(channel_layouts), AV_OPT_TYPE_BINARY, .flags = FLAGS }, { "channel_counts", "set the supported channel counts", OFFSET(channel_counts), AV_OPT_TYPE_BINARY, .flags = FLAGS }, - { "all_channel_counts", "accept all channel counts", OFFSET(all_channel_counts), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS }, + { "all_channel_counts", "accept all channel counts", OFFSET(all_channel_counts), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS }, { NULL }, }; #undef FLAGS