summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-12 19:38:45 +0100
committerwm4 <wm4@nowhere>2017-11-12 19:38:45 +0100
commit41243e7c4f98b410195397b6758f9796acd9de57 (patch)
tree4cb89dc464a0cdb0b65d76be2cd33d68d776852b /demux/demux_lavf.c
parent41cefe3e1f12b1d74355fad83f9d56091f278c05 (diff)
downloadmpv-41243e7c4f98b410195397b6758f9796acd9de57.tar.bz2
mpv-41243e7c4f98b410195397b6758f9796acd9de57.tar.xz
demux_lavf: always give libavformat the filename when probing
This gives the filename or URL to the libavformat probing logic, which might use the file extension as a "help" to decide which format the file is. This helps with mp3 files that have large id3v2 tags and prevents the idiotic ffmpeg probing logic to think that a mp3 file is amr. (What we really want is knowing whether we _really_ need to feed more data to libavformat to detect the format. And without having to pre-read excessive amounts of data for relatively normal streams.)
Diffstat (limited to 'demux/demux_lavf.c')
-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 ea496ecf95..393ed92397 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -403,7 +403,7 @@ static int lavf_check_file(demuxer_t *demuxer, enum demux_check check)
AVProbeData avpd = {
// Disable file-extension matching with normal checks
- .filename = check <= DEMUX_CHECK_REQUEST ? priv->filename : "",
+ .filename = priv->filename,
.buf_size = 0,
.buf = av_mallocz(PROBE_BUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE),
};