ffv1enc: Check return value of av_frame_ref()