--- a/main.c
+++ b/main.c
@@ -188,7 +188,7 @@
/* start playback */
-#define PLAY_TIMEOUT 1000
+#define PLAY_TIMEOUT 700
static int player_start(player_t* player){
yauap_priv_t* priv = player->yauap_priv;
GstState state;
@@ -209,7 +209,7 @@
/* wait until we are really playing back */
while(timeout > 0 && gst_element_get_state(priv->play, &state, NULL, 0) && state != GST_STATE_PLAYING){
// printf("waiting...\n");
- usleep(100);
+ usleep(10000);
--timeout;
}
if(timeout <= 0){
@@ -679,7 +679,7 @@
/************************ decodeable check ***************************************/
/* how many microseconds shall we wait for the detection to succeed */
-#define DETECT_TIMEOUT 100000
+#define DETECT_TIMEOUT 700000
/* callback function that checks if a audio decoder has been added */
@@ -752,6 +752,7 @@
}
/* stop playback */
+ gst_element_set_state(decodebin,GST_STATE_NULL);
gst_element_set_state(play,GST_STATE_NULL);
}