@@ -676,28 +676,6 @@ Mix_MusicType detect_music_type(SDL_RWops *src)
676
676
return MUS_MID ;
677
677
}
678
678
679
- #ifdef ID3_EXTRA_FORMAT_CHECKS
680
- if (SDL_memcmp (magic , "ID3" , 3 ) == 0 ) {
681
- id3len = get_id3v2_length (src );
682
-
683
- /* Check if there is something not an MP3, however, also has ID3 tag */
684
- if (id3len > 0 ) {
685
- SDL_RWseek (src , id3len , SDL_RW_SEEK_CUR );
686
- readlen = SDL_RWread (src , submagic , 4 );
687
- SDL_RWseek (src , start , SDL_RW_SEEK_SET );
688
-
689
- if (readlen == 4 ) {
690
- if (SDL_memcmp (submagic , "fLaC" , 4 ) == 0 )
691
- return MUS_FLAC ;
692
- }
693
- }
694
- }
695
-
696
- /* Detect MP3 format by frame header [needs scanning of bigger part of the file] */
697
- if (detect_mp3 (submagic , src , start , id3len )) {
698
- return MUS_MP3 ;
699
- }
700
-
701
679
/* GME Specific files */
702
680
if (SDL_memcmp (magic , "ZXAY" , 4 ) == 0 )
703
681
return MUS_GME ;
@@ -724,6 +702,27 @@ Mix_MusicType detect_music_type(SDL_RWops *src)
724
702
if (SDL_memcmp (magic , "\x1f\x8b" , 2 ) == 0 )
725
703
return MUS_GME ;
726
704
705
+ if (SDL_memcmp (magic , "ID3" , 3 ) == 0 ) {
706
+ id3len = get_id3v2_length (src );
707
+
708
+ /* Check if there is something not an MP3, however, also has ID3 tag */
709
+ if (id3len > 0 ) {
710
+ SDL_RWseek (src , id3len , SDL_RW_SEEK_CUR );
711
+ readlen = SDL_RWread (src , submagic , 4 );
712
+ SDL_RWseek (src , start , SDL_RW_SEEK_SET );
713
+
714
+ if (readlen == 4 ) {
715
+ if (SDL_memcmp (submagic , "fLaC" , 4 ) == 0 )
716
+ return MUS_FLAC ;
717
+ }
718
+ }
719
+ }
720
+
721
+ /* Detect MP3 format by frame header [needs scanning of bigger part of the file] */
722
+ if (detect_mp3 (submagic , src , start , id3len )) {
723
+ return MUS_MP3 ;
724
+ }
725
+
727
726
/* Assume MOD format.
728
727
*
729
728
* Apparently there is no way to check if the file is really a MOD,
0 commit comments