vaapi_h264: Fix frame_num after non-reference frames