> > + ret = av_reallocp(&param->rc_stats_buffer.buf, param->rc_stats_buffer.sz);

> Why realloc instead of malloc?

As far as I gathered, rc_stats_buffer.buf is already allocated by SVT-AV1; if 
malloc is preferred, I can change it and test to make sure it doesn’t cause any 
obvious issues.


> Wouldn't it be safer to free rc_stats_buffer.buf and set rc_stats_buffer.sz 
> to 0 on failure here too?

Absolutely agree on setting rc_stats_buffer.sz to 0, not quite sure about 
freeing rc_stats_buffer_buf it is allocated by SVT-AV1.

Thank you for the review, the other comments will be fixed in V2.

/Fredrik
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to