Make avfilter_graph_add_filter() returns AVERROR(ENOMEM) in case of
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 13 Apr 2010 23:22:22 +0000 (23:22 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 13 Apr 2010 23:22:22 +0000 (23:22 +0000)
failed reallocation, rather than just -1.

Originally committed as revision 22878 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/avfiltergraph.c

index 8fbbecf..2fcf73a 100644 (file)
@@ -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;