diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2000-01-10 17:43:38 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2000-01-10 17:43:38 +0000 |
commit | 409dd4c398f1838a0ad445b042ca29dee12a726b (patch) | |
tree | 37985b2ea1da9f16cbc9bb04514107e198ff6e90 /formats/format_g723.c | |
parent | 85c8729ed3bc4523f28c2c1918969f42cc0a9bed (diff) |
Version 0.1.3 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats/format_g723.c')
-rwxr-xr-x | formats/format_g723.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/formats/format_g723.c b/formats/format_g723.c index 3824e04e7..e72c3c644 100755 --- a/formats/format_g723.c +++ b/formats/format_g723.c @@ -102,6 +102,8 @@ static struct ast_filestream *g723_rewrite(int fd, char *comment) tmp->owner = NULL; tmp->fr = NULL; tmp->lasttimeout = -1; + tmp->orig.tv_usec = 0; + tmp->orig.tv_sec = 0; glistcnt++; pthread_mutex_unlock(&g723_lock); ast_update_use_count(); @@ -189,8 +191,8 @@ static int ast_read_callback(void *data) delay = ntohl(delay); else delay = -1; - /* Average out frames <= 40 ms */ - if (delay < 41) + /* Average out frames <= 50 ms */ + if (delay < 50) s->fr->timelen = 30; else s->fr->timelen = delay; @@ -227,8 +229,8 @@ static int g723_apply(struct ast_channel *c, struct ast_filestream *s) s->owner = c; /* Read and ignore the first delay */ if (read(s->fd, &delay, 4) != 4) { - ast_log(LOG_WARNING, "Bad stream?\n"); - return -1; + /* Empty file */ + return 0; } ast_read_callback(s); return 0; |