git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d0e142b
)
ffprobe: use new avformat_open_* API.
author
Anton Khirnov
<anton@khirnov.net>
Thu, 9 Jun 2011 08:58:23 +0000
(10:58 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Thu, 16 Jun 2011 18:24:57 +0000
(20:24 +0200)
ffprobe.c
patch
|
blob
|
history
diff --git
a/ffprobe.c
b/ffprobe.c
index
e00790f
..
711a172
100644
(file)
--- 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;
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 = av
format_open_input(&fmt_ctx, filename, iformat, &format_opts
)) < 0) {
print_error(filename, err);
return err;
}
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) {
/* fill the streams in the format context */
if ((err = av_find_stream_info(fmt_ctx)) < 0) {