[FFmpeg-cvslog] avprobe: fix function prototype

Luca Barbato git at videolan.org
Sat May 26 22:41:52 CEST 2012


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Fri May 25 15:19:50 2012 -0700| [70026be8e52460776f8023f35cdad3e854e752ae] | committer: Luca Barbato

avprobe: fix function prototype

Make opt_output_format return the correct value.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70026be8e52460776f8023f35cdad3e854e752ae
---

 avprobe.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/avprobe.c b/avprobe.c
index 5313894..f809e46 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -757,7 +757,7 @@ static int opt_format(const char *opt, const char *arg)
     return 0;
 }
 
-static void opt_output_format(const char *opt, const char *arg)
+static int opt_output_format(const char *opt, const char *arg)
 {
 
     if (!strcmp(arg, "json")) {
@@ -781,8 +781,9 @@ static void opt_output_format(const char *opt, const char *arg)
         print_string  = ini_print_string;
     } else {
         av_log(NULL, AV_LOG_ERROR, "Unsupported formatter %s\n", arg);
-        exit(1);
+        return AVERROR(EINVAL);
     }
+    return 0;
 }
 
 static int opt_show_format_entry(const char *opt, const char *arg)



More information about the ffmpeg-cvslog mailing list