From 5113f2e4a51c25b459a333529f44b8f3f51f25fc Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 8 Dec 2014 16:56:08 -0500 Subject: [PATCH] find stream info --- hello.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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);