summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-18 04:40:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-18 05:10:38 +0200
commit2905e3ff6462431d55f89614b24e2a407707c82a (patch)
treed482d458a449228c8475942117c7eb81ec8934c6 /ffprobe.c
parent44d1b4088f2959912a27ffbffc5884db1b35a645 (diff)
parent78440c007cd310bb27ac2af5fb7ea5b7555efc84 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavc: add opt_find to AVCodecContext class. h264: Complexify frame num gap shortening code intreadwrite.h: fix AV_RL32/AV_RB32 signedness. Fix decoding of mpegts streams with h264 video that does *NOT* have b frames Add minor bumps and APIChanges entries for lavf private options. ffmpeg: deprecate -vc and -tvstd ffmpeg: use new avformat_open_* API. ffserver: use new avformat_open_* API. ffprobe: use new avformat_open_* API. ffplay: use new avformat_open_* API. cmdutils: add opt_default2(). dict: add AV_DICT_APPEND flag. lavf: add avformat_write_header() as a replacement for av_write_header(). Deprecate av_open_input_* and remove their uses. lavf: add avformat_open_input() as a replacement for av_open_input_* AVOptions: add av_opt_find() as a replacement for av_find_opt. AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context. ffmpeg: don't abuse a global for passing frame size from input to output ffmpeg: don't abuse a global for passing pixel format from input to output ffmpeg: initialise encoders earlier. Conflicts: cmdutils.c doc/APIchanges ffmpeg.c ffplay.c ffprobe.c libavcodec/h264.c libavformat/avformat.h libavformat/utils.c libavformat/version.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ffprobe.c b/ffprobe.c
index e945a9a54d..f0ec9e4739 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -262,18 +262,18 @@ static void show_format(AVFormatContext *fmt_ctx)
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
{
int err, i;
- AVFormatParameters fmt_params;
- AVFormatContext *fmt_ctx;
-
- memset(&fmt_params, 0, sizeof(fmt_params));
- fmt_params.prealloced_context = 1;
- 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, &fmt_params)) < 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) {