summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-07-27 23:17:09 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-07-30 11:31:59 +0200
commitd564e1bf19cbeb4bd5aae9cbf92b79445fde96c8 (patch)
tree4a4033e3ec7f837b59620a34a33750fcc4f566f0
parent86860beeaecb747b98014ac5eb6d89c64ac85f60 (diff)
vdpau: fix GstBaseVideoDecoder returning wrong GstStateChangeReturn
when gst_base_video_decoder_[start|stop] fails we now return GST_STATE_CHANGE_FAILURE instead of returning what the parent class returns
-rw-r--r--sys/vdpau/basevideodecoder/gstbasevideodecoder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vdpau/basevideodecoder/gstbasevideodecoder.c b/sys/vdpau/basevideodecoder/gstbasevideodecoder.c
index 353badffa..1e9cf14ec 100644
--- a/sys/vdpau/basevideodecoder/gstbasevideodecoder.c
+++ b/sys/vdpau/basevideodecoder/gstbasevideodecoder.c
@@ -914,24 +914,26 @@ gst_base_video_decoder_change_state (GstElement * element,
GstStateChangeReturn ret;
base_video_decoder = GST_BASE_VIDEO_DECODER (element);
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
- gst_base_video_decoder_start (base_video_decoder);
+ if (!gst_base_video_decoder_start (base_video_decoder))
+ return GST_STATE_CHANGE_FAILURE;
break;
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
- gst_base_video_decoder_stop (base_video_decoder);
+ if (!gst_base_video_decoder_stop (base_video_decoder))
+ ret = GST_STATE_CHANGE_FAILURE;
break;
default:
break;
}