mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix crash at the end of audio assistant.
This fix is only a workaround for 3.8.x branch. The bug is fixed in a better way in mediastreamer2, master branch.
This commit is contained in:
parent
dcc9539574
commit
527c47b8d7
1 changed files with 8 additions and 1 deletions
|
|
@ -57,6 +57,11 @@ static void activate_play_button(gboolean is_active){
|
|||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(play_button),is_active);
|
||||
}
|
||||
|
||||
static gboolean deactivate_play_button(void){
|
||||
activate_play_button(FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gchar *get_record_file(){
|
||||
char filename[256]={0};
|
||||
char date[64]={0};
|
||||
|
|
@ -239,7 +244,9 @@ static void endoffile_cb(void *ud, MSFilter *f, unsigned int ev,void * arg){
|
|||
switch (ev) {
|
||||
case MS_PLAYER_EOF: {
|
||||
ms_message("EndOfFile received");
|
||||
activate_play_button(FALSE);
|
||||
/*workaround for a mediastreamer2 bug. Don't deactivate the play button, because it will stop the graph from the end of file callback,
|
||||
* which is sometimes crashing. On master branch it is fixed in mediastreamer2, the workaround is only valid in 3.8.x branch*/
|
||||
g_timeout_add(0, (GSourceFunc)deactivate_play_button, NULL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue