[FFmpeg-devel] theora depayloader

Josh Allmann joshua.allmann
Sat Mar 20 07:19:30 CET 2010


On 19 March 2010 21:21, Martin Storsj? <martin at martin.st> wrote:
> On Fri, 19 Mar 2010, Josh Allmann wrote:
>
>> On 19 March 2010 05:23, Martin Storsj? <martin at martin.st> wrote:
>> >
>> > On Fri, 19 Mar 2010, Josh Allmann wrote:
>> >
>> >
>> >> + ? ?ptr = codec->extradata = av_mallocz(length + length / 255 + 64);
>> >
>> > Doesn't extradata need FF_INPUT_BUFFER_PADDING_SIZE at the end?
>>
>> I'm not sure, but since extradata is identical to vorbis, I'll
>> investigate that when I refactor out common code.
>
> Let me rephrase - if the vorbis code doesn't add padding to the extradata,
> it's a bug, no need to replicate it here. The vorbis code can be fixed
> and/or merged with parts of this later, but don't add more incorrectness
> just for uniformness :-)

+    ptr = codec->extradata = av_mallocz(length + FF_INPUT_BUFFER_PADDING_SIZE);

This version seems to work ok. Although I honestly don't know what the
old (length/255+64) padding did -- I don't see anything in the
(vorbis) rfc about it, and nothing from a cursory examination of the
feng payloaders. The length field alone should cover everything.

>
> // Martin
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>



More information about the ffmpeg-devel mailing list