diff options
author | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-04-25 18:28:17 +0900 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-04-25 18:28:17 +0900 |
commit | 5f1d6b6e5ae515abfb77c78c44d21ee21beb0fc3 (patch) | |
tree | 6b757d37d296709dfd5955ef9d4d41426cd47da6 /demux/demux_lavf.c | |
parent | d64ff3aa51b49451348383a6ff6de7697a52dc62 (diff) | |
parent | 983d24e3b9ce9c9c7755279138c14170e85fbf37 (diff) | |
download | mpv-5f1d6b6e5ae515abfb77c78c44d21ee21beb0fc3.tar.bz2 mpv-5f1d6b6e5ae515abfb77c78c44d21ee21beb0fc3.tar.xz |
Merge branch 'master' into release/0.9
* master: (87 commits)
manpage: move --autosync description
player: add --window-scale option
player: flush decoder even if cover art is decoded
player: don't show A/V desync message in non-sense situations
w32_common: add more rounded-down frame rates
w32_common: use the current monitor's refresh rate
dxva2: fix broken build with gcc 5.1
terminal: printf() is not signal-safe
man: fix PDF build
DOCS/mplayer-changes: Eleborate on joystick input
osc: add nil check for element.eventresponder
mp_image: remove some unused interlacing flags
vf_vapoursynth: update _FieldBased semantics
options: remove unneeded hack from command line parser
manpage: document ff-index sub-property
demux_mkv: limit timestamp fixing to 1ms max
demux_mkv: attempt to fix rounded timestamps
demux_mkv: move global options to the demuxer
demux_mkv: better seeking after video end
lua: add utils.format_json() function
...
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r-- | demux/demux_lavf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index dd122f7325..c14869555c 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) @@ -540,10 +545,6 @@ static void handle_stream(demuxer_t *demuxer, int i) sh_video->aspect = codec->width * codec->sample_aspect_ratio.num / (float)(codec->height * codec->sample_aspect_ratio.den); - sh_video->bitrate = codec->bit_rate; - if (sh_video->bitrate == 0) - sh_video->bitrate = avfc->bit_rate; - uint8_t *sd = av_stream_get_side_data(st, AV_PKT_DATA_DISPLAYMATRIX, NULL); if (sd) sh_video->rotate = -av_display_rotation_get((uint32_t *)sd); |