From 41243e7c4f98b410195397b6758f9796acd9de57 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 12 Nov 2017 19:38:45 +0100 Subject: 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.) --- demux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux') 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), }; -- cgit v1.2.3