lavc: move decoding-related code from utils.c to a new file