summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-04 20:38:46 +0200
committerwm4 <wm4@nowhere>2014-05-24 16:29:46 +0200
commite7e2a6c8f77e4e6dce92652668b849dc9fc933e2 (patch)
tree16d7b6a645747cf6964458d7ab96a75c717cd3f4
parent6643ebaa28200fd7ea70377530969d90383ff444 (diff)
downloadmpv-e7e2a6c8f77e4e6dce92652668b849dc9fc933e2.tar.bz2
mpv-e7e2a6c8f77e4e6dce92652668b849dc9fc933e2.tar.xz
demux_lavf: one more hack for mp3 from network
mp3 has a hack lowering the probescore for format detection. This is because detecting mp3s is hard due to their nature, and the fact that ID3v2 tags are sometimes several megabytes big. When playing mp3 from network, the mime-type is usually set, and that matches the format hack entry meant for webradios, overriding the normal mp3 entry. This can lead to network mp3s not being detected. Lower the network case to the same probescore as on-disk mp3s. The difference is that for network mp3s, we don't load the full probe-buffer, and we lower the amount of audio the demuxer will read to collect data on opening (0.5 seconds instead of typically 5 seconds).
-rw-r--r--demux/demux_lavf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 80a2e5fad4..7a57b6c43e 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -97,8 +97,8 @@ static const struct format_hack format_hacks[] = {
// for webradios
{"aac", "audio/aacp", 25, 0.5},
{"aac", "audio/aac", 25, 0.5},
- {"mp3", "audio/mpeg", 25, 0.5},
// some mp3 files don't detect correctly
+ {"mp3", "audio/mpeg", 24, 0.5},
{"mp3", NULL, 24, .max_probe = true},
{0}
};