vdpaumpegdec: set correct timestamps

This commit is contained in:
Carl-Anton Ingmarsson 2009-05-05 18:37:50 +02:00 committed by Jan Schmidt
parent fda9c56a59
commit e416f5f5e0

View file

@ -163,7 +163,6 @@ gst_vdp_mpeg_decoder_decode (GstVdpMpegDecoder * mpeg_dec,
if (mpeg_dec->vdp_info.picture_coding_type != B_FRAME) {
if (mpeg_dec->vdp_info.backward_reference != VDP_INVALID_HANDLE) {
GST_BUFFER_TIMESTAMP (mpeg_dec->b_buffer) = timestamp;
gst_buffer_ref (mpeg_dec->b_buffer);
gst_vdp_decoder_push_video_buffer (dec,
GST_VDP_VIDEO_BUFFER (mpeg_dec->b_buffer));
@ -183,6 +182,7 @@ gst_vdp_mpeg_decoder_decode (GstVdpMpegDecoder * mpeg_dec,
outbuf = gst_vdp_video_buffer_new (dec->device, VDP_CHROMA_TYPE_420,
dec->width, dec->height);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
if (mpeg_dec->vdp_info.forward_reference != VDP_INVALID_HANDLE)
gst_vdp_video_buffer_add_reference (outbuf,
GST_VDP_VIDEO_BUFFER (mpeg_dec->f_buffer));
@ -215,7 +215,6 @@ gst_vdp_mpeg_decoder_decode (GstVdpMpegDecoder * mpeg_dec,
}
if (mpeg_dec->vdp_info.picture_coding_type == B_FRAME) {
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
gst_vdp_decoder_push_video_buffer (dec, GST_VDP_VIDEO_BUFFER (outbuf));
} else {
mpeg_dec->vdp_info.backward_reference = surface;