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
This commit is contained in:
Carl-Anton Ingmarsson 2010-07-27 23:17:09 +02:00
parent 86860beeae
commit d564e1bf19

View file

@ -917,7 +917,8 @@ gst_base_video_decoder_change_state (GstElement * 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:
@ -928,7 +929,8 @@ gst_base_video_decoder_change_state (GstElement * element,
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: