---
 tools/aviocat.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/aviocat.c b/tools/aviocat.c
index 52a96bd..9284db1 100644
--- a/tools/aviocat.c
+++ b/tools/aviocat.c
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
     avformat_network_init();
 
     for (i = 1; i < argc; i++) {
-        if (!strcmp(argv[i], "-b")) {
+        if (!strcmp(argv[i], "-b") && i + 1 < argc) {
             bps = atoi(argv[i + 1]);
             i++;
         } else if (!input_url) {
-- 
1.7.9.4

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

Reply via email to