[MPlayer-cvslog] r31189 - trunk/libao2/ao_pcm.c

reimar subversion at mplayerhq.hu
Fri May 21 19:19:01 CEST 2010


Author: reimar
Date: Fri May 21 19:19:01 2010
New Revision: 31189

Log:
Change WAV header updating in ao_pcm to allow to up to almost 4GB size.
Patch by Rob McMullen [robm users sourceforge net]

Modified:
   trunk/libao2/ao_pcm.c

Modified: trunk/libao2/ao_pcm.c
==============================================================================
--- trunk/libao2/ao_pcm.c	Fri May 21 13:20:23 2010	(r31188)
+++ trunk/libao2/ao_pcm.c	Fri May 21 19:19:01 2010	(r31189)
@@ -210,9 +210,11 @@ static void uninit(int immed){
 #endif
         if (broken_seek || fseek(fp, 0, SEEK_SET) != 0)
             mp_msg(MSGT_AO, MSGL_ERR, "Could not seek to start, WAV size headers not updated!\n");
-        else if (data_length > 0x7ffff000)
-            mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n");
         else {
+            if (data_length > 0xfffff000) {
+                mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n");
+                data_length = 0xfffff000;
+            }
             write_wave_header(fp, data_length);
         }
     }


More information about the MPlayer-cvslog mailing list