ffprobe: fix exit code with stream specifiers
authorNicolas George <nicolas.george@normalesup.org>
Wed, 26 Jun 2013 13:17:27 +0000 (15:17 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 26 Jun 2013 22:20:20 +0000 (00:20 +0200)
Without this fix, ffprobe would exit with a failure exit code if a stream
specifier is given that selects the last stream.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
ffprobe.c

index d2a682b..d8bc202 100644 (file)
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1921,6 +1921,7 @@ static int probe_file(WriterContext *wctx, const char *filename)
                     goto end;
                 else
                     selected_streams[i] = ret;
+                ret = 0;
             } else {
                 selected_streams[i] = 1;
             }