aboutsummaryrefslogtreecommitdiffstats
path: root/ffprobe.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-06-09 10:58:23 +0200
committerAnton Khirnov <anton@khirnov.net>2011-06-16 20:24:57 +0200
commite0518705c8f575488a50407eee3edcc94c905973 (patch)
treecd9d2fa83b11f97a59c2b2b6e4509f6859d086bd /ffprobe.c
parentd0e142bb68fdc817fb84f2395ae416d43ca141ce (diff)
downloadffmpeg-e0518705c8f575488a50407eee3edcc94c905973.tar.gz
ffprobe: use new avformat_open_* API.
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ffprobe.c b/ffprobe.c
index e00790f54b..711a17246d 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -262,15 +262,18 @@ static void show_format(AVFormatContext *fmt_ctx)
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
{
int err, i;
- AVFormatContext *fmt_ctx;
-
- fmt_ctx = avformat_alloc_context();
- set_context_opts(fmt_ctx, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
+ AVFormatContext *fmt_ctx = NULL;
+ AVDictionaryEntry *t;
- if ((err = av_open_input_file(&fmt_ctx, filename, iformat, 0, NULL)) < 0) {
+ if ((err = avformat_open_input(&fmt_ctx, filename, iformat, &format_opts)) < 0) {
print_error(filename, err);
return err;
}
+ if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
+ av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key);
+ return AVERROR_OPTION_NOT_FOUND;
+ }
+
/* fill the streams in the format context */
if ((err = av_find_stream_info(fmt_ctx)) < 0) {