Prefer av_freep() over av_free() for variables in the context for safety.