diff options
Diffstat (limited to 'apps/app_confbridge.c')
-rw-r--r-- | apps/app_confbridge.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 71608d426..e533c80e7 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -568,11 +568,18 @@ static int play_sound_file(struct conference_bridge *conference_bridge, const ch if (!(conference_bridge->playback_chan)) { int cause; - - if (!(conference_bridge->playback_chan = ast_request("Bridge", AST_FORMAT_SLINEAR, NULL, "", &cause))) { + struct ast_format_cap *cap = ast_format_cap_alloc_nolock(); + struct ast_format tmpfmt; + if (!cap) { + return -1; + } + ast_format_cap_add(cap, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0)); + if (!(conference_bridge->playback_chan = ast_request("Bridge", cap, NULL, "", &cause))) { ast_mutex_unlock(&conference_bridge->playback_lock); + cap = ast_format_cap_destroy(cap); return -1; } + cap = ast_format_cap_destroy(cap); conference_bridge->playback_chan->bridge = conference_bridge->bridge; |