encoder:h264: Fix the check for packed-header support

Use VA_ENC_PACKED_HEADER_* definition for checking.

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
This commit is contained in:
Sreerenj Balachandran 2015-07-02 21:37:56 +03:00
parent a260426194
commit 02d8092da9

View file

@ -2163,11 +2163,11 @@ ensure_sequence (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture)
/* add subset sps for non-base view and sps for base view */ /* add subset sps for non-base view and sps for base view */
if (encoder->is_mvc && encoder->view_idx) { if (encoder->is_mvc && encoder->view_idx) {
if ((GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) & VAEncPackedHeaderH264_SPS) if ((GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) & VA_ENC_PACKED_HEADER_SEQUENCE)
&& !add_packed_sequence_header_mvc (encoder, picture, sequence)) && !add_packed_sequence_header_mvc (encoder, picture, sequence))
goto error_create_packed_seq_hdr; goto error_create_packed_seq_hdr;
} else { } else {
if ((GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) & VAEncPackedHeaderH264_SPS) if ((GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) & VA_ENC_PACKED_HEADER_SEQUENCE)
&& !add_packed_sequence_header (encoder, picture, sequence)) && !add_packed_sequence_header (encoder, picture, sequence))
goto error_create_packed_seq_hdr; goto error_create_packed_seq_hdr;
} }
@ -2271,7 +2271,7 @@ ensure_picture (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture,
return FALSE; return FALSE;
if (picture->type == GST_VAAPI_PICTURE_TYPE_I && if (picture->type == GST_VAAPI_PICTURE_TYPE_I &&
(GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) & VAEncPackedHeaderH264_PPS) (GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) & VA_ENC_PACKED_HEADER_PICTURE)
&& !add_packed_picture_header (encoder, picture)) { && !add_packed_picture_header (encoder, picture)) {
GST_ERROR ("set picture packed header failed"); GST_ERROR ("set picture packed header failed");
return FALSE; return FALSE;