[FFmpeg-devel] [PATCH] Fix g726 encoder

Benjamin Larsson banan
Fri Sep 12 12:32:43 CEST 2008


Rafa?l Carr? wrote:
> On Thu, 2008-09-04 at 12:51 +0200, Michael Niedermayer wrote:
>> On Thu, Sep 04, 2008 at 11:17:29AM +0200, Rafa?l Carr? wrote:
>>> The g726 encoder iterates over the output buffer instead of the provided
>>> samples.
>>>
>>> Use a big output buffer like VLC, and overwrite your memory as you see
>>> fit.
>> I dont see how any memory could be overwritten.
>> out of array reads yes, writes no
> 
> Yes my mistake it is out of array read, but the patch nevertheless stays
> correct (fix the out of array read).
> 
>>> To know the size of the input buffer, the minimal frame size (in samples
>>> per channel) is needed, but doesn't exist in the code.
>>>
>>> I just use the same size that the reference code: 256 samples (32 ms)
>> I suspect this needs a update to the regression test checksums too
> 
> Is that something you can do before commit, after applying the patch ?
> 

After you have patched run "make test". This will show a diff in the
g726 regressions tests. Change the values so the reg tests doesn't fail.
And submit that with your patch.

MvH
Benjamin Larsson




More information about the ffmpeg-devel mailing list