summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Smith <msmith@songbirdnest.com>2009-02-12 17:31:50 -0800
committerMichael Smith <msmith@songbirdnest.com>2009-02-12 17:31:50 -0800
commit9eaccf65508891a62d27fc43370b44b872242057 (patch)
tree4a9afeec855e95fe1a5cc8e7d08d61877394f284 /sys
parent24e1e955478f19675641aed4b9c638a177609d4a (diff)
dshowvideosink: Return ASYNC appropriately from change_state.
Make sure we don't do the wrong thing when our base class is returning ASYNC in state changes.
Diffstat (limited to 'sys')
-rw-r--r--sys/dshowvideosink/dshowvideosink.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dshowvideosink/dshowvideosink.cpp b/sys/dshowvideosink/dshowvideosink.cpp
index 0745921c0..ae17c2716 100644
--- a/sys/dshowvideosink/dshowvideosink.cpp
+++ b/sys/dshowvideosink/dshowvideosink.cpp
@@ -869,7 +869,7 @@ static GstStateChangeReturn
gst_dshowvideosink_change_state (GstElement * element, GstStateChange transition)
{
GstDshowVideoSink *sink = GST_DSHOWVIDEOSINK (element);
- GstStateChangeReturn ret;
+ GstStateChangeReturn ret, rettmp;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
@@ -878,7 +878,7 @@ gst_dshowvideosink_change_state (GstElement * element, GstStateChange transition
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
ret = gst_dshowvideosink_start_graph (sink);
- if (ret != GST_STATE_CHANGE_SUCCESS)
+ if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
break;
}
@@ -887,10 +887,14 @@ gst_dshowvideosink_change_state (GstElement * element, GstStateChange transition
switch (transition) {
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
- ret = gst_dshowvideosink_pause_graph (sink);
+ rettmp = gst_dshowvideosink_pause_graph (sink);
+ if (rettmp == GST_STATE_CHANGE_FAILURE)
+ ret = rettmp;
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
- ret = gst_dshowvideosink_stop_graph (sink);
+ rettmp = gst_dshowvideosink_stop_graph (sink);
+ if (rettmp == GST_STATE_CHANGE_FAILURE)
+ ret = rettmp;
break;
case GST_STATE_CHANGE_READY_TO_NULL:
gst_dshowvideosink_clear (sink);