[Ffmpeg-devel] Patch: wav decoder eof handling
Ulrich von Zadow
coder
Wed Jun 28 11:29:43 CEST 2006
Hi,
I've attached a new patch. Comments are below.
Michael Niedermayer wrote:
>>+typedef struct {
>>+ int wave_chunk_start;
>
> should be int64_t / uint64_t to avoid a 2gb limit on the file
I've changed that and wave_chunk_len to unsigned int, since that is the
effective limit of the file format (as M?ns Rullg?rd pointed out).
>>@@ -331,6 +336,9 @@
>> size = find_tag(pb, MKTAG('d', 'a', 't', 'a'));
>> if (size < 0)
>> return -1;
>>+ WAVIContext * wav_context = (WAVIContext*)s->priv_data;
>
> mixing statements and declarations breaks gcc 2.95
> (see http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC33)
Fixed.
>> AVStream *st;
>>
>>+ WAVIContext * wav_context = (WAVIContext*)s->priv_data;
>>+ int64_t bytes_to_read = s->data_offset+(int64_t)(wav_context->wave_chunk_len)-url_ftell(&s->pb);
>>+ if (bytes_to_read <= 0) {
>
> this ignores wave_chunk_start and as such wont work
Fixed.
Any comments on the multiple data chunk handling? Is my reading of the spec correct?
Cheers,
Uli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg_wav_eof.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060628/c94273de/attachment.txt>
More information about the ffmpeg-devel
mailing list