aboutsummaryrefslogtreecommitdiffstats
path: root/ffprobe.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2014-11-09 18:28:29 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-11-09 18:28:29 +0100
commite971eef8c0d2ebe461bb17f19a590b53511cc8f2 (patch)
treeedaa9749b0e3fd005071d47dd00c11412f3ca3bd /ffprobe.c
parent4e179436b6c859ae2e47ab088de8fc89b379a07b (diff)
downloadffmpeg-e971eef8c0d2ebe461bb17f19a590b53511cc8f2.tar.gz
Set -scan_all_pmts 1 in ffmpeg, ffplay and ffprobe if not set by user.
Fixes ticket #3762.
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index 3eb02080f7..24ecafd2ec 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2386,12 +2386,19 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
AVFormatContext *fmt_ctx = NULL;
AVDictionaryEntry *t;
AVDictionary **opts;
+ int scan_all_pmts_set = 0;
+ if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {
+ av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE);
+ scan_all_pmts_set = 1;
+ }
if ((err = avformat_open_input(&fmt_ctx, filename,
iformat, &format_opts)) < 0) {
print_error(filename, err);
return err;
}
+ if (scan_all_pmts_set)
+ av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE);
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;