From 22b7b23c17bfca1be19e3f9004209ed0b82ddb37 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Tue, 13 Apr 2010 23:22:22 +0000 Subject: [PATCH] Make avfilter_graph_add_filter() returns AVERROR(ENOMEM) in case of failed reallocation, rather than just -1. Originally committed as revision 22878 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavfilter/avfiltergraph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 8fbbecf055..2fcf73ab5c 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -40,7 +40,7 @@ int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter) sizeof(AVFilterContext*) * ++graph->filter_count); if (!graph->filters) - return -1; + return AVERROR(ENOMEM); graph->filters[graph->filter_count - 1] = filter;