avcodec/h264: handle ref of curr_pic.f before copying context over it