[FFmpeg-devel] [PATCH v4] lavc/audiotoolboxenc: fix noise in encoded audio
James Almer
jamrial at gmail.com
Wed Jan 3 22:34:01 EET 2018
On 1/3/2018 1:54 AM, zhangjiejun1992 at gmail.com wrote:
> From: Jiejun Zhang <zhangjiejun1992 at gmail.com>
>
> 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 is freed, and
> somebody else (maybe the decoder) will write into the AVBuffer and
> change the data. AudioToolbox then encodes some wrong data and noise
> is produced. Retaining a frame reference solves this problem.
> ---
> libavcodec/audiotoolboxenc.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
Applied.
More information about the ffmpeg-devel
mailing list