avcodec/utils: Clear dimensions in ff_get_buffer() on failure