[FFmpeg-devel] [PATCH]Decode some invalid wav files

Michael Niedermayer michaelni
Wed Feb 3 19:16:29 CET 2010


On Wed, Feb 03, 2010 at 04:34:43AM -0600, Daniel Verkamp wrote:
> On Mon, Feb 1, 2010 at 7:15 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> > Daniel Verkamp <daniel <at> drv.nu> writes:
> >
> >> This doesn't look right - data_size is only set in the rf64 case (read
> >> from a special rf64-only header), so it is some random value at this
> >> point for a non-rf64 file. ?This probably works by accident (on my
> >> system, it currently happens to get initialized to a large positive
> >> value).
> >
> > Thanks for having a look and explaining.
> >
> > How can wav->data_end be set correctly?
> >
> > Carl Eugen
> >
> 
> Something like the attached looks like it should work (tested with -f
> framecrc, results match for broken file and correct one).  This just
> assumes the data chunk runs until the end of the file if the size is
> not valid. In theory this breaks actual 0-length files with more
> chunks after the data chunk, but I doubt it should matter in practice.
> 
> Thanks,
> -- Daniel Verkamp

> From 0b94931fab41318e3e2b3309a820acaede5eba81 Mon Sep 17 00:00:00 2001
> From: Daniel Verkamp <daniel at drv.nu>
> Date: Wed, 3 Feb 2010 05:24:24 -0500
> Subject: [PATCH] Demux WAV files with data chunk size = 0

why dont you just
if(!size)size=MAX
?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100203/ec2089dc/attachment.pgp>



More information about the ffmpeg-devel mailing list