changeset 5068:64bf084309cf

mp3 detection fixed...
author arpi
date Thu, 14 Mar 2002 11:18:19 +0000
parents 54fe37e1f1a7
children b472d2511fea
files libmpdemux/demuxer.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Thu Mar 14 02:26:49 2002 +0000
+++ b/libmpdemux/demuxer.c	Thu Mar 14 11:18:19 2002 +0000
@@ -603,6 +603,8 @@
   } else {
     printf("MPEG packet stats: p100: %d  p101: %d  PES: %d  MP3: %d \n",
 	num_elementary_packets100,num_elementary_packets101,num_elementary_packetsPES,num_mp3audio_packets);
+    if(num_mp3audio_packets>50 && num_mp3audio_packets>2*num_elementary_packets100)
+	break; // it's .MP3
     // some hack to get meaningfull error messages to our unhappy users:
     if(num_elementary_packets100>=2 && num_elementary_packets101>=2 &&
        abs(num_elementary_packets101+8-num_elementary_packets100)<16){