[FFmpeg-devel] [PATCH 2/5] sink_buffer: change error code.
Stefano Sabatini
stefasab at gmail.com
Fri Mar 9 18:06:59 CET 2012
On date Thursday 2012-03-08 14:49:15 +0100, Nicolas George encoded:
> request_frame is supposed to either
> push a frame or return a failure code.
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/sink_buffer.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c
> index 926362b..cb089e9 100644
> --- a/libavfilter/sink_buffer.c
> +++ b/libavfilter/sink_buffer.c
> @@ -131,7 +131,7 @@ int av_buffersink_get_buffer_ref(AVFilterContext *ctx,
> }
>
> if (!av_fifo_size(buf->fifo))
> - return AVERROR(EINVAL);
> + return AVERROR_BUG;
OK but please be more specific in the message (I had to check the code
and tinker about it), something like:
Make av_buffersink_get_buffer() return AVERROR_BUG in case
avfilter_request_frame() neither gets a frame nor returns an error
code and the FIFO buffer is still empty.
--
FFmpeg = Fancy & Fanciful Maxi Perfectionist Erotic Gnome
More information about the ffmpeg-devel
mailing list