Remove use of the deprecated function avcodec_check_dimensions(), use