Move the MPEG ES detection further back because it is not very precise and misdetects other stuff (e.g. MP3 frames...).

This commit is contained in:
Moritz Bunkus 2004-11-29 22:33:10 +00:00
parent be2adf1aba
commit 71cfef481f

View File

@ -285,8 +285,6 @@ get_file_type(const string &filename) {
type = TYPEQTMP4; type = TYPEQTMP4;
else if (tta_reader_c::probe_file(mm_io, size)) else if (tta_reader_c::probe_file(mm_io, size))
type = TYPETTA; type = TYPETTA;
else if (mpeg_es_reader_c::probe_file(mm_io, size))
type = TYPEMPEG;
else { else {
for (i = 0; (probe_sizes[i] != 0) && (type == TYPEUNKNOWN); i++) for (i = 0; (probe_sizes[i] != 0) && (type == TYPEUNKNOWN); i++)
if (mp3_reader_c::probe_file(mm_io, size, probe_sizes[i], 5)) if (mp3_reader_c::probe_file(mm_io, size, probe_sizes[i], 5))
@ -300,8 +298,10 @@ get_file_type(const string &filename) {
type = TYPEMP3; type = TYPEMP3;
else if (dts_reader_c::probe_file(mm_io, size)) else if (dts_reader_c::probe_file(mm_io, size))
type = TYPEDTS; type = TYPEDTS;
else if (aac_reader_c::probe_file(mm_io, size)) else if (aac_reader_c::probe_file(mm_io, size, 2 * 1024 * 1024, 10))
type = TYPEAAC; type = TYPEAAC;
else if (mpeg_es_reader_c::probe_file(mm_io, size))
type = TYPEMPEG;
else { else {
delete mm_io; delete mm_io;