mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
tests/playback: correct state change checking
Correct the test apps check if result of state change is not failure as the state change can happen async https://bugzilla.gnome.org/show_bug.cgi?id=739346
This commit is contained in:
parent
691f020c57
commit
d86aba27ce
2 changed files with 6 additions and 6 deletions
|
@ -32,7 +32,7 @@ main (gint argc, gchar * argv[])
|
|||
g_object_set (G_OBJECT (player), "uri", argv[1], NULL);
|
||||
|
||||
res = gst_element_set_state (player, GST_STATE_PLAYING);
|
||||
if (res != GST_STATE_CHANGE_SUCCESS) {
|
||||
if (res == GST_STATE_CHANGE_FAILURE) {
|
||||
g_print ("could not play\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ main (gint argc, gchar * argv[])
|
|||
|
||||
g_print ("play...\n");
|
||||
res = gst_element_set_state (player, GST_STATE_PLAYING);
|
||||
if (res != GST_STATE_CHANGE_SUCCESS) {
|
||||
if (res == GST_STATE_CHANGE_FAILURE) {
|
||||
g_print ("could not play\n");
|
||||
return -1;
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ main (gint argc, gchar * argv[])
|
|||
|
||||
g_print ("pause...\n");
|
||||
res = gst_element_set_state (player, GST_STATE_PAUSED);
|
||||
if (res != GST_STATE_CHANGE_SUCCESS) {
|
||||
g_print ("could not play\n");
|
||||
if (res == GST_STATE_CHANGE_FAILURE) {
|
||||
g_print ("could not pause\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ main (gint argc, gchar * argv[])
|
|||
|
||||
g_print ("play...\n");
|
||||
res = gst_element_set_state (player, GST_STATE_PLAYING);
|
||||
if (res != GST_STATE_CHANGE_SUCCESS) {
|
||||
if (res == GST_STATE_CHANGE_FAILURE) {
|
||||
g_print ("could not play\n");
|
||||
return -1;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ main (gint argc, gchar * argv[])
|
|||
|
||||
g_print ("play...\n");
|
||||
res = gst_element_set_state (player, GST_STATE_PLAYING);
|
||||
if (res != GST_STATE_CHANGE_SUCCESS) {
|
||||
if (res == GST_STATE_CHANGE_FAILURE) {
|
||||
g_print ("could not play\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue