diff options
author | Russell Bryant <russell@russellbryant.com> | 2005-11-21 02:01:36 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2005-11-21 02:01:36 +0000 |
commit | 3d6c054ca8666a3bbedb3d9b1f07bef1049bc0e8 (patch) | |
tree | 0b056b93fe7f76b9c26f2d0dfac749da292cd6f5 /apps/app_record.c | |
parent | edef0bbf2f02e23fabfb51908950a26dcedadcec (diff) |
issue #5787
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_record.c')
-rwxr-xr-x | apps/app_record.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_record.c b/apps/app_record.c index 7c50a1d73..85310ea70 100755 --- a/apps/app_record.c +++ b/apps/app_record.c @@ -277,6 +277,7 @@ static int record_exec(struct ast_channel *chan, void *data) if (res) { ast_log(LOG_WARNING, "Problem writing frame\n"); + ast_frfree(f); break; } @@ -295,16 +296,15 @@ static int record_exec(struct ast_channel *chan, void *data) break; } } - } - if (f->frametype == AST_FRAME_VIDEO) { + } else if (f->frametype == AST_FRAME_VIDEO) { res = ast_writestream(s, f); if (res) { ast_log(LOG_WARNING, "Problem writing frame\n"); + ast_frfree(f); break; } - } - if ((f->frametype == AST_FRAME_DTMF) && + } else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == terminator)) { ast_frfree(f); break; |