lavc/mediacodec_wrapper: fix local reference leaks