aboutsummaryrefslogtreecommitdiffhomepage
path: root/demux
diff options
context:
space:
mode:
authorGravatar sergey.dobrodey <sergey.dobrodey@synesis.ru>2018-04-10 13:17:03 +0300
committerGravatar Jan Ekström <jeebjp@gmail.com>2018-04-12 02:10:46 +0300
commit36161f0456353990f82e08989e92131191fcd2e2 (patch)
treee2ccf4dbb5dc934ba9d3e6dc63f82049c922fddc /demux
parentc33faee6bac27102cd04897ceec9ab040473d9ba (diff)
demux_lavf: skip demuxer hack iteration if hacks are disabled
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 27c5f5087f..320df49df5 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -443,10 +443,8 @@ static int lavf_check_file(demuxer_t *demuxer, enum demux_check check)
priv->avif->name, score, avpd.buf_size,
forced_format ? " (forced)" : "");
- for (int n = 0; format_hacks[n].ff_name; n++) {
+ for (int n = 0; lavfdopts->hacks && format_hacks[n].ff_name; n++) {
const struct format_hack *entry = &format_hacks[n];
- if (!lavfdopts->hacks)
- continue;
if (!matches_avinputformat_name(priv, entry->ff_name))
continue;
if (entry->mime_type && strcasecmp(entry->mime_type, mime_type) != 0)