GstVdpauDevice *device;
VdpBitstreamBuffer vbit[1];
VdpStatus status;
+ GstFlowReturn ret;
dec = GST_VDPAU_DECODER (mpeg_dec);
gst_buffer_ref (GST_BUFFER (outbuf));
+ ret = gst_vdpau_decoder_push_video_buffer (GST_VDPAU_DECODER (mpeg_dec),
+ outbuf);
+
if (mpeg_dec->vdp_info.forward_reference != VDP_INVALID_HANDLE)
gst_buffer_unref (mpeg_dec->f_buffer);
mpeg_dec->vdp_info.forward_reference = surface;
mpeg_dec->f_buffer = GST_BUFFER (outbuf);
- return gst_vdpau_decoder_push_video_buffer (GST_VDPAU_DECODER (mpeg_dec),
- outbuf);
+ return ret;
}
static gboolean
return TRUE;
}
+static gboolean
+gst_vdpau_mpeg_decoder_parse_sequence (GstVdpauMpegDecoder * mpeg_dec,
+ guint8 * data, guint8 * end)
+{
+ GstVdpauDecoder *dec;
+ MPEGSeqHdr hdr;
+
+ dec = GST_VDPAU_DECODER (mpeg_dec);
+
+ if (!mpeg_util_parse_sequence_hdr (&hdr, data, end))
+ return FALSE;
+
+ memcpy (&mpeg_dec->vdp_info.intra_quantizer_matrix,
+ &hdr.intra_quantizer_matrix, 64);
+ memcpy (&mpeg_dec->vdp_info.non_intra_quantizer_matrix,
+ &hdr.non_intra_quantizer_matrix, 64);
+
+ return TRUE;
+}
+
static gboolean
gst_vdpau_mpeg_decoder_parse_picture (GstVdpauMpegDecoder * mpeg_dec,
guint8 * data, guint8 * end)
break;
case MPEG_PACKET_SEQUENCE:
GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_SEQUENCE");
+ gst_vdpau_mpeg_decoder_parse_sequence (mpeg_dec, data, end);
break;
case MPEG_PACKET_EXTENSION:
GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_EXTENSION");
("Couldn't get data from vdpau"),
("Error returned from vdpau was: %s",
device->vdp_get_error_string (status)));
- return GST_FLOW_ERROR;
+ break;
}
break;
}
("Couldn't get data from vdpau"),
("Error returned from vdpau was: %s",
device->vdp_get_error_string (status)));
- return GST_FLOW_ERROR;
+ break;
}
break;
}
break;
}
+ gst_buffer_unref (buffer);
+
if (outbuf) {
gst_buffer_copy_metadata (outbuf, buffer, GST_BUFFER_COPY_TIMESTAMPS);