2019-03-11 5:17 GMT+01:00, Sun, Jing A <jing.a....@intel.com>: > 2019-03-08 11:36 GMT+01:00, Jing SUN <jing.a....@intel.com>: > >> +static void free_buffer(SvtContext *svt_enc) { >> + EB_H265_ENC_INPUT *in_data = >> (EB_H265_ENC_INPUT *)svt_enc->in_buf.pBuffer; > > Is the cast necessary? > Or actually: Can't in_data be whatever doesn't produce a warning? > [SUN, Jing] Yes, it's necessary, because the type of pBuffer is uint8_t* in > libsvt_hevc.
You could make in_data uint8_t*. >> + >> + if (in_data) >> + av_freep(&in_data); > > The condition is unnecessary. > [SUN, Jing] If av_mallocz fails, free_buffer will be called with in_data > being NULL. Checking it avoids unnecessary calling to av_freep in that > case. Please remove the condition (or the function). Please fix your quoting, Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel