diff options
author | Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com> | 2009-04-27 20:18:52 +0200 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-06-20 15:21:33 +0100 |
commit | f16aa7271ef571bd260c2a820d0ee0af09c94d11 (patch) | |
tree | e76da9de6c8c6b9de5db2aa85c1564c5533b8e08 | |
parent | a94f5fe520260991206850f13bc4df578ccbbc97 (diff) | |
download | gst-plugins-bad-f16aa7271ef571bd260c2a820d0ee0af09c94d11.tar.gz gst-plugins-bad-f16aa7271ef571bd260c2a820d0ee0af09c94d11.tar.bz2 gst-plugins-bad-f16aa7271ef571bd260c2a820d0ee0af09c94d11.zip |
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
-rw-r--r-- | sys/vdpau/gstvdpdecoder.c | 5 |
1 files 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; |