diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c index b0df738633..76f08384a1 100644 --- a/libmpdemux/demuxer.c +++ b/libmpdemux/demuxer.c @@ -662,9 +662,9 @@ int i; if (file_format) { if ((demuxer_desc = get_demuxer_desc_from_type(file_format))) { demuxer = new_demuxer(stream,demuxer_desc->type,audio_id,video_id,dvdsub_id,filename); - if (demuxer_desc->check_file) { + if (demuxer_desc->check_file) fformat = demuxer_desc->check_file(demuxer); - if (force) + if (force || !demuxer_desc->check_file) fformat = demuxer_desc->type; if (fformat != 0) { if (fformat == demuxer_desc->type) { @@ -686,7 +686,6 @@ if (file_format) { // Check failed for forced demuxer, quit free_demuxer(demuxer); return NULL; - } } }