summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2020-02-14 16:17:04 +0800
committerTim-Philipp Müller <tim@centricular.com>2020-02-14 13:56:01 +0000
commit8dc12763cab23c2d84dedd0790fd87e67ad32b82 (patch)
tree166d8f14b44fd048865356df3bac4278a0ac5d87
parente2ef80c81029d8b52ac0e60b61e95f0f3a1ed798 (diff)
downloadgstreamer-vaapi-8dc12763cab23c2d84dedd0790fd87e67ad32b82.tar.gz
libs: h265enc: Set VA_PICTURE_HEVC_INVALID flag for invalid picture
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h265.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
index c9f16289..68bbdd7a 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
@@ -1610,7 +1610,7 @@ fill_picture (GstVaapiEncoderH265 * encoder, GstVaapiEncPicture * picture,
}
for (; i < 15; ++i) {
pic_param->reference_frames[i].picture_id = VA_INVALID_SURFACE;
- pic_param->reference_frames[i].flags = 0;
+ pic_param->reference_frames[i].flags = VA_PICTURE_HEVC_INVALID;
}
pic_param->coded_buf = GST_VAAPI_OBJECT_ID (codedbuf);
@@ -1735,7 +1735,7 @@ add_slice_headers (GstVaapiEncoderH265 * encoder, GstVaapiEncPicture * picture,
}
for (; i_ref < G_N_ELEMENTS (slice_param->ref_pic_list0); ++i_ref) {
slice_param->ref_pic_list0[i_ref].picture_id = VA_INVALID_SURFACE;
- slice_param->ref_pic_list0[i_ref].flags = 0;
+ slice_param->ref_pic_list0[i_ref].flags = VA_PICTURE_HEVC_INVALID;
}
i_ref = 0;
@@ -1755,7 +1755,7 @@ add_slice_headers (GstVaapiEncoderH265 * encoder, GstVaapiEncPicture * picture,
}
for (; i_ref < G_N_ELEMENTS (slice_param->ref_pic_list1); ++i_ref) {
slice_param->ref_pic_list1[i_ref].picture_id = VA_INVALID_SURFACE;
- slice_param->ref_pic_list1[i_ref].flags = 0;
+ slice_param->ref_pic_list1[i_ref].flags = VA_PICTURE_HEVC_INVALID;
}
slice_param->max_num_merge_cand = 5; /* MaxNumMergeCand */