diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-09-06 19:50:21 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-09-06 19:50:21 +0000 |
commit | a6c5758715bfa048d857d57a238c3a71df3dc836 (patch) | |
tree | 1964022b96c647b31f627e51457d9c069061ae00 | |
parent | aacbf3f8c453e7e9f899968f5a4bcf356ade782d (diff) |
execute the check function even when a demuxer is forced, to avoid crashes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16414 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demuxer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c index 0c2a2739ab..3508277f4a 100644 --- a/libmpdemux/demuxer.c +++ b/libmpdemux/demuxer.c @@ -597,8 +597,11 @@ 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 (!force && demuxer_desc->check_file) { - if ((fformat = demuxer_desc->check_file(demuxer)) != 0) { + if (demuxer_desc->check_file) { + fformat = demuxer_desc->check_file(demuxer); + if (force) + fformat = demuxer_desc->type; + if (fformat != 0) { if (fformat == demuxer_desc->type) { // Move messages to demuxer detection code? mp_msg(MSGT_DEMUXER, MSGL_INFO, MSGTR_Detected_XXX_FileFormat, demuxer_desc->shortdesc); |