Commit c9699019 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

test: Make sure we wait for the correct state in media_player test.

parent cdbcc3a0
...@@ -104,6 +104,15 @@ static void test_media_player_pause_stop(const char** argv, int argc) ...@@ -104,6 +104,15 @@ static void test_media_player_pause_stop(const char** argv, int argc)
assert( state == libvlc_Playing || state == libvlc_MediaPlayerEndReached ); assert( state == libvlc_Playing || state == libvlc_MediaPlayerEndReached );
libvlc_media_player_pause (mi, &ex); libvlc_media_player_pause (mi, &ex);
/* Wait a correct state */
do {
state = libvlc_media_player_get_state (mi, &ex);
catch ();
} while( state != libvlc_Paused &&
state != libvlc_Error &&
state != libvlc_MediaPlayerEndReached );
assert( libvlc_media_player_get_state (mi, &ex) == libvlc_Paused ); assert( libvlc_media_player_get_state (mi, &ex) == libvlc_Paused );
catch(); catch();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment