[FFmpeg-devel] [PATCH] lavc/audiotoolboxenc: fix noise in encoded audio
Carl Eugen Hoyos
ceffmpeg at gmail.com
Tue Jan 2 14:03:54 EET 2018
2018-01-02 8:52 GMT+01:00 <zhangjiejun1992 at gmail.com>:
> @@ -565,6 +579,10 @@ static av_cold int ffat_close_encoder(AVCodecContext *avctx)
> ff_bufqueue_discard_all(&at->frame_queue);
> ff_bufqueue_discard_all(&at->used_frame_queue);
> ff_af_queue_close(&at->afq);
> + if (at->audio_data_buf_size > 0) {
> + at->audio_data_buf_size = 0;
> + av_free(at->audio_data_buf);
> + }
The if() looks unnecessary.
Could you explain what this patch changes?
>From a quick look, until now a buffer a was used with a calculated size x.
After the patch, a buffer b with the same calculated size x is allocated,
and x bytes are copied from a to b.
What do I miss?
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list