From cd99146253cf9de5dad5694b97027d5612fdc61d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 2 Jul 2012 20:13:40 +0200 Subject: lavfi: add error handling to filter_samples(). --- libavfilter/internal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libavfilter/internal.h') diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 954610e3ca..26059c927b 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -111,8 +111,12 @@ struct AVFilterPad { * and should do its processing. * * Input audio pads only. + * + * @return >= 0 on success, a negative AVERROR on error. This function + * must ensure that samplesref is properly unreferenced on error if it + * hasn't been passed on to another filter. */ - void (*filter_samples)(AVFilterLink *link, AVFilterBufferRef *samplesref); + int (*filter_samples)(AVFilterLink *link, AVFilterBufferRef *samplesref); /** * Frame poll callback. This returns the number of immediately available -- cgit v1.2.3