aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_record.c')
-rwxr-xr-xapps/app_record.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_record.c b/apps/app_record.c
index c1f06780a..7de7016c0 100755
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -301,7 +301,7 @@ static int record_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Could not answer channel '%s'\n", chan->name);
LOCAL_USER_REMOVE(u);
- if (silence > 0) {
+ if ((silence > 0) && rfmt) {
res = ast_set_read_format(chan, rfmt);
if (res)
ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);