avcencoder: (qsd8k) Switch malloc/free callbacks to use pointers

 instead of ints

* mirrors change made to softavcencoder

Change-Id: I69e17134145211425ab35f43efa23b894ca66157