summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-05-21 17:19:01 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-05-21 17:19:01 +0000
commit0dd2ddd2bc71bb180811eae73ecc15c526520144 (patch)
tree1c9d51d3d357d735f70dd382048af27907ffde93 /libao2
parentcb3496d251d2170140f1d5373e84905213ba43aa (diff)
downloadmpv-0dd2ddd2bc71bb180811eae73ecc15c526520144.tar.bz2
mpv-0dd2ddd2bc71bb180811eae73ecc15c526520144.tar.xz
Change WAV header updating in ao_pcm to allow to up to almost 4GB size.
Patch by Rob McMullen [robm users sourceforge net] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31189 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_pcm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c
index 10ee82a0e2..d7c0e39d07 100644
--- a/libao2/ao_pcm.c
+++ b/libao2/ao_pcm.c
@@ -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);
}
}