diff --git a/hello.c b/hello.c index 95d9c92..a0430a7 100644 --- a/hello.c +++ b/hello.c @@ -14,7 +14,13 @@ int main(int argc, char * argv[]) if (avformat_open_input(&context, argv[1], NULL, NULL) != 0) { fprintf(stderr, "Error opening input stream %s\n", argv[1]); - return 2; + return 1; + } + + if (avformat_find_stream_info(context, NULL) < 0) + { + fprintf(stderr, "Error finding stream info\n"); + return 1; } avformat_close_input(&context);