---
ffprobe.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ffprobe.c b/ffprobe.c
index e00790f..a1062ce 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -263,14 +263,20 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr,
const char *filename)
{
int err, i;
AVFormatContext *fmt_ctx;
+ AVDictionaryEntry *t;
fmt_ctx = avformat_alloc_context();
- set_context_opts(fmt_ctx, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
+ fmt_ctx->iformat = iformat;
- if ((err = av_open_input_file(&fmt_ctx, filename, iformat, 0, NULL)) < 0) {
+ if ((err = avformat_open_input(&fmt_ctx, filename, &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) {
--
1.7.5.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel