Re: [FFmpeg-devel] [PATCH v2] lavc/audiotoolboxenc: fix noise in encoded audio

2018-01-02 Thread Jiejun Zhang
> > Can't you instead create a new reference for the frame buffer? Or will > making it non writable break things further into the process? It would > save you a memcpy per frame. Great idea. It works. Making it non-writable should be enough. I'm submitting v3. Please take a look. _

Re: [FFmpeg-devel] [PATCH v2] lavc/audiotoolboxenc: fix noise in encoded audio

2018-01-02 Thread James Almer
On 1/2/2018 12:03 PM, zhangjiejun1...@gmail.com wrote: > From: Jiejun Zhang > > This fixes #6940 > > Although undocumented, AudioToolbox seems to require the data supplied > by the callback (i.e. ffat_encode_callback) being unchanged until the > next time the callback is called. In the old imple

[FFmpeg-devel] [PATCH v2] lavc/audiotoolboxenc: fix noise in encoded audio

2018-01-02 Thread zhangjiejun1992
From: Jiejun Zhang This fixes #6940 Although undocumented, AudioToolbox seems to require the data supplied by the callback (i.e. ffat_encode_callback) being unchanged until the next time the callback is called. In the old implementation, the AVBuffer backing the frame is recycled after the frame