mpv-player/mpv — pull request #1064 by brunogm0 (2014-09-04 23:51:54+00:00)
Title: malloc+memset(0) to calloc

Hi, cleaned up.

realloc thing was for the possibility of leak if the realloc fails and the copy is lost forever.

Both av_malloc or av_mallocz in mem.c in ffmpeg was last changed in 2002. Libressl devs made a good case on practices of malloc calloc memset for both security and performance.