From f16aa7271ef571bd260c2a820d0ee0af09c94d11 Mon Sep 17 00:00:00 2001 From: Carl-Anton Ingmarsson Date: Mon, 27 Apr 2009 20:18:52 +0200 Subject: vdpau: small fixes init create GstVdpDevice on GST_STATE_CHANGE_READY_TO_PAUSED instead of on GST_STATE_CHANGE_NULL_TO READY add back incrementing of frame_nr --- sys/vdpau/gstvdpdecoder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/vdpau/gstvdpdecoder.c b/sys/vdpau/gstvdpdecoder.c index b3faf837..8b79dff0 100644 --- a/sys/vdpau/gstvdpdecoder.c +++ b/sys/vdpau/gstvdpdecoder.c @@ -68,6 +68,7 @@ gst_vdp_decoder_push_video_buffer (GstVdpDecoder * dec, GST_BUFFER_TIMESTAMP (buffer) = gst_util_uint64_scale_int (GST_SECOND * dec->frame_nr, dec->framerate_denominator, dec->framerate_numerator); + dec->frame_nr++; } gst_buffer_set_caps (GST_BUFFER (buffer), GST_PAD_CAPS (dec->src)); @@ -82,10 +83,10 @@ gst_vdp_decoder_change_state (GstElement * element, GstStateChange transition) dec = GST_VDP_DECODER (element); switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: + case GST_STATE_CHANGE_READY_TO_PAUSED: dec->device = gst_vdp_get_device (dec->display_name); break; - case GST_STATE_CHANGE_READY_TO_NULL: + case GST_STATE_CHANGE_PAUSED_TO_READY: g_object_unref (dec->device); dec->device = NULL; break; -- cgit v1.2.1