diff options
author | wm4 <wm4@nowhere> | 2015-04-17 22:03:25 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-17 22:03:25 +0200 |
commit | 01cfcd68142d72f4805db9a033cdd63106bae6cc (patch) | |
tree | c57ffce866a78c23e04817673d60f81ed0f37a57 /demux/demux_lavf.c | |
parent | 55ba4db742911689a7feb45b7b102dfd12e8eda8 (diff) | |
download | mpv-01cfcd68142d72f4805db9a033cdd63106bae6cc.tar.bz2 mpv-01cfcd68142d72f4805db9a033cdd63106bae6cc.tar.xz |
demuxer_lavf: add an option for disabling hacks
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r-- | demux/demux_lavf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index dd122f7325..16cff835f8 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -65,6 +65,7 @@ struct demux_lavf_opts { char *format; char *cryptokey; char **avopts; + int hacks; int genptsmode; }; @@ -78,6 +79,7 @@ const struct m_sub_options demux_lavf_conf = { OPT_FLAG("allow-mimetype", allow_mimetype, 0), OPT_INTRANGE("probescore", probescore, 0, 1, AVPROBE_SCORE_MAX), OPT_STRING("cryptokey", cryptokey, 0), + OPT_FLAG("hacks", hacks, 0), OPT_CHOICE("genpts-mode", genptsmode, 0, ({"lavf", 1}, {"no", 0})), OPT_KEYVALUELIST("o", avopts, 0), @@ -86,6 +88,7 @@ const struct m_sub_options demux_lavf_conf = { .size = sizeof(struct demux_lavf_opts), .defaults = &(const struct demux_lavf_opts){ .allow_mimetype = 1, + .hacks = 1, // AVPROBE_SCORE_MAX/4 + 1 is the "recommended" limit. Below that, the // user is supposed to retry with larger probe sizes until a higher // value is reached. @@ -351,6 +354,8 @@ static int lavf_check_file(demuxer_t *demuxer, enum demux_check check) for (int n = 0; format_hacks[n].ff_name; n++) { const struct format_hack *entry = &format_hacks[n]; + if (!lavfdopts->hacks) + continue; if (!matches_avinputformat_name(priv, entry->ff_name)) continue; if (entry->mime_type && strcasecmp(entry->mime_type, mime_type) != 0) |