[FFmpeg-devel] [PATCH 2/2] Make avfilter_graph_add_filter() returns AVERROR(ENOMEM) in case of failed reallocation, rather than just -1.
Stefano Sabatini
stefano.sabatini-lala
Sun Apr 11 23:27:03 CEST 2010
---
libavfilter/avfiltergraph.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 75249e8..9ad6536 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -39,7 +39,7 @@ int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
AVFilterContext **filters = av_realloc(graph->filters,
sizeof(AVFilterContext*) * (graph->filter_count+1));
if (!filters)
- return -1;
+ return AVERROR(ENOMEM);
graph->filters = filters;
graph->filters[graph->filter_count++] = filter;
--
1.7.0
More information about the ffmpeg-devel
mailing list