Commit c38f9901 authored by Jan Gerber's avatar Jan Gerber
Browse files

fix avinfo standalone build

parent 0b6bcb69
...@@ -507,9 +507,7 @@ void json_format_info(FILE* output, AVFormatContext *ic, const char *url) { ...@@ -507,9 +507,7 @@ void json_format_info(FILE* output, AVFormatContext *ic, const char *url) {
#ifdef AVINFO #ifdef AVINFO
int main(int argc, char **argv) { int main(int argc, char **argv) {
char inputfile_name[255]; char inputfile_name[255];
AVInputFormat *input_fmt = NULL; AVFormatContext *context = NULL;
AVFormatParameters *formatParams = NULL;
AVFormatContext *context;
FILE* output = stdout; FILE* output = stdout;
avcodec_register_all(); avcodec_register_all();
...@@ -524,8 +522,8 @@ int main(int argc, char **argv) { ...@@ -524,8 +522,8 @@ int main(int argc, char **argv) {
output = fopen(argv[2], "w"); output = fopen(argv[2], "w");
} }
if (av_open_input_file(&context, inputfile_name, input_fmt, 0, formatParams) >= 0) { if (avformat_open_input(&context, inputfile_name, NULL, NULL) >= 0) {
if (av_find_stream_info(context) >= 0) { if (avformat_find_stream_info(context, NULL) >= 0) {
json_format_info(output, context, inputfile_name); json_format_info(output, context, inputfile_name);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment