2018-01-02 8:52 GMT+01:00 <zhangjiejun1...@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 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel