priv->width = seq_hdr->width;
priv->height = seq_hdr->height;
priv->has_seq_ext = FALSE;
+ priv->has_quant_matrix_ext = FALSE;
priv->size_changed = TRUE;
priv->quant_matrix_changed = TRUE;
priv->progressive_sequence = TRUE;
gst_vaapi_picture_replace(&priv->current_picture, picture);
gst_vaapi_picture_unref(picture);
- status = ensure_quant_matrix(decoder, picture);
- if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) {
- GST_ERROR("failed to reset quantizer matrix");
- return status;
- }
-
if (!gst_mpeg_video_parse_picture_header(pic_hdr, buf, buf_size, 4)) {
GST_ERROR("failed to parse picture header");
return GST_VAAPI_DECODER_STATUS_ERROR_BITSTREAM_PARSER;
guint8 quantiser_scale_code;
guint8 intra_slice = 0;
guint8 extra_bit_slice, junk8;
+ GstVaapiDecoderStatus status;
GST_DEBUG("slice %d @ %p, %u bytes)", slice_no, buf, buf_size);
+ if (slice_no == 0){
+ status = ensure_quant_matrix(decoder, picture);
+ if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) {
+ GST_ERROR("failed to reset quantizer matrix");
+ return status;
+ }
+ }
+
if (picture->slices->len == 0 && !fill_picture(decoder, picture))
return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;