From ebc8d974817fe456a0afe6867fdeb22c761fb04f Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 8 Jul 2012 17:29:42 +0200 Subject: lavfi: add error handling to start_frame(). --- libavfilter/video.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libavfilter/video.h') diff --git a/libavfilter/video.h b/libavfilter/video.h index ce4e9c2992..3edf47addc 100644 --- a/libavfilter/video.h +++ b/libavfilter/video.h @@ -39,7 +39,7 @@ AVFilterBufferRef *ff_null_get_video_buffer(AVFilterLink *link, int perms, int w AVFilterBufferRef *ff_get_video_buffer(AVFilterLink *link, int perms, int w, int h); -void ff_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); +int ff_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); void ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir); void ff_null_end_frame(AVFilterLink *link); @@ -51,8 +51,11 @@ void ff_null_end_frame(AVFilterLink *link); * frame need only be valid once draw_slice() is called for that * portion. The receiving filter will free this reference when * it no longer needs it. + * + * @return >= 0 on success, a negative AVERROR on error. This function will + * unreference picref in case of error. */ -void ff_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); +int ff_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); /** * Notify the next filter that the current frame has finished. -- cgit v1.2.3