fix memory release
Merge branch 'hevc' of https://github.com/OpenHEVC/openHEVC into hevc