fixing C99 issues
code aligned with smarter/libav/hevc