From f05ec1c7389719f151b9d2053f0050abff7f7252 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 27 May 2013 22:48:04 +0200 Subject: options: add allow-mimetype suboption for demux_lavf This can control whether demux_lavf should use the HTTP mime type to determine the format, instead of probing the data with the libavformat API. Do this to allow easier debugging in case the mimetype is incorrect. (This is done only for AAC streams right now.) --- demux/demux_lavf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'demux/demux_lavf.c') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 2141d3ab0a..58fe390507 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -55,6 +55,7 @@ const m_option_t lavfdopts_conf[] = { OPT_INTRANGE("probesize", lavfdopts.probesize, 0, 32, INT_MAX), OPT_STRING("format", lavfdopts.format, 0), OPT_INTRANGE("analyzeduration", lavfdopts.analyzeduration, 0, 0, INT_MAX), + OPT_FLAG("allow-mimetype", lavfdopts.allow_mimetype, 0), OPT_INTRANGE("probescore", lavfdopts.probescore, 0, 0, 100), OPT_STRING("cryptokey", lavfdopts.cryptokey, 0), OPT_STRING("o", lavfdopts.avopt, 0), @@ -218,7 +219,7 @@ static int lavf_check_file(demuxer_t *demuxer) format = demuxer->stream->lavf_type; if (!format) format = avdevice_format; - if (!format && demuxer->stream->mime_type) + if (!format && lavfdopts->allow_mimetype && demuxer->stream->mime_type) format = (char *)find_demuxer_from_mime_type(demuxer->stream->mime_type); if (format) { if (strcmp(format, "help") == 0) { -- cgit v1.2.3