Fix use-after-free crash in media playback and use French tones
Replace North American ringback/busy tones with French standard (440 Hz single tone with 1.5s/3.5s and 0.5s/0.5s cadences). Fix a crash in on_playing_done where the error/cancel path freed the MediaPlaybackData via g_autoptr without clearing the owning pointer (data_calling/data_busy), leaving a dangling pointer that would segfault on the next stop call.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -175,6 +175,18 @@ on_playing_done (GObject *object,
|
||||
g_warning ("Playing '%s' failed: %s",
|
||||
playback_event_to_string (data->event),
|
||||
error->message);
|
||||
|
||||
switch (data->event) {
|
||||
case PLAYBACK_CALLING:
|
||||
data->self->data_calling = NULL;
|
||||
break;
|
||||
case PLAYBACK_BUSY:
|
||||
data->self->data_busy = NULL;
|
||||
break;
|
||||
case PLAYBACK_LAST:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (g_timer_elapsed (data->timer, NULL) < data->min_playback_time) {
|
||||
playback_data (g_steal_pointer (&data));
|
||||
|
||||
Reference in New Issue
Block a user