Mercurial > mplayer.hg
changeset 16413:a07354861027
execute the check function even when a demuxer is forced, to avoid crashes.
author | reimar |
---|---|
date | Tue, 06 Sep 2005 19:50:21 +0000 |
parents | b86be98019b1 |
children | cdb7069d57b0 |
files | libmpdemux/demuxer.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demuxer.c Tue Sep 06 19:46:48 2005 +0000 +++ b/libmpdemux/demuxer.c Tue Sep 06 19:50:21 2005 +0000 @@ -597,8 +597,11 @@ 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);