On 07/04/15 00:03, Vittorio Giovara wrote:
On Fri, Apr 3, 2015 at 4:12 PM, Himangi Saraogi <[email protected]> wrote:
---
This fixes CID 1292529.

  libavfilter/filtfmts.c | 15 +++++++++++++--
  1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/libavfilter/filtfmts.c b/libavfilter/filtfmts.c
index 40649c7..cc04654 100644
--- a/libavfilter/filtfmts.c
+++ b/libavfilter/filtfmts.c
@@ -33,7 +33,7 @@ int main(int argc, char **argv)
      AVFilterGraph *graph_ctx;
      const char *filter_name;
      const char *filter_args = NULL;
-    int i, j;
+    int i, j, ret = 0;

      av_log_set_level(AV_LOG_DEBUG);

@@ -74,11 +74,21 @@ int main(int argc, char **argv)
      /* create a link for each of the input pads */
      for (i = 0; i < filter_ctx->nb_inputs; i++) {
          AVFilterLink *link = av_mallocz(sizeof(AVFilterLink));
+        if (!link) {
+            fprintf(stderr, "Unable to allocate memory for filter input 
link\n");
+            ret = 1;

Is there any particular reason for returning a positive value? To my
understanding when returning from main 0 means success, >0 warning, <0
failure.

1 - managed failure

> 1 - custom managed failure (few people like to do that)

< 0 - non - managed failure (sigill, sigsegv sigabrt etc)

You can have $? in your PS1 and see immediately =)

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to