[Ffmpeg-devel] [PATCH] THP PCM decoder (GSoC Qualification)

Marco Gerards mgerards
Thu Apr 5 23:33:21 CEST 2007


Michael Niedermayer <michaelni at gmx.at> writes:

Hi,

[...]

>> >> +        if (samples + samplecnt >= samples_end) {
>> >> +            av_log(avctx, AV_LOG_ERROR, "allocated output buffer is too small\n");
>> >> +            return -1;
>> >> +        }
>> >
>> > this is twofold buggy
>> 
>> Ehm right... Do you mean it should be "samples + samplecnt * st > samples_end"?
>
> you are on the right track toward fixing one of 2 bugs in this line of code
> but you rather just introduced a third one

In the beginning of this function there is a "samples_end= samples +
*data_size/2;".  So do you mean I do not have to take care of stereo
in this check?  Or what are the bugs you mean?

--
Marco





More information about the ffmpeg-devel mailing list