summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-27 23:26:22 +0200
committerwm4 <wm4@nowhere>2013-05-27 23:26:22 +0200
commit8cfb87d200b9029d9318d1c6ce76e489e78c2121 (patch)
tree324bcf36302584ffae7cb95a83d235c0678e46d4 /core
parentf05ec1c7389719f151b9d2053f0050abff7f7252 (diff)
downloadmpv-8cfb87d200b9029d9318d1c6ce76e489e78c2121.tar.bz2
mpv-8cfb87d200b9029d9318d1c6ce76e489e78c2121.tar.xz
demux_lavf: minimal probing and reduced analyzeduration for AAC over HTTP
When AAC is streamed over HTTP, using libavformat defaults is pathetically slow. One solution for that is skipping probing and using the mimetype to identify that it's AAC instead. This is what we did before this commit (and ffmpeg does it too, but their logic is too "inaccessible" for mpv). This is still pretty fragile though. Make it a bit more robust by requiring minimal probing. A probescore of 25 is reached after feeding 2 KB to libavformat (instead of > 500 KB for the normal probescore), so use that. This is done only when streaming AAC from HTTP to reduce the possibility of weird breakages for other formats. Also reduce analyzeduration. The default analyzeduration will make libavformat read lots of data, which makes playback start slow. So we set analyzeduration to a low value. On the other hand, doing that for other formats is risky, because there are unspecified effects with certain "strange" formats (like transport streams). So we do this only if we're streaming AAC from HTTP as well. tl;dr libavformat is shit for media players
Diffstat (limited to 'core')
-rw-r--r--core/options.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/options.h b/core/options.h
index b2e38ec56d..25aa82791a 100644
--- a/core/options.h
+++ b/core/options.h
@@ -222,7 +222,7 @@ typedef struct MPOpts {
struct lavfdopts {
int probesize;
int probescore;
- int analyzeduration;
+ float analyzeduration;
int allow_mimetype;
char *format;
char *cryptokey;