mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 19:16:46 +00:00
res_rtp_asterisk.c: Use correct timeout value for T.140 RED timer.
Found while reviewing #1128
This commit is contained in:
@@ -623,7 +623,6 @@ struct rtp_red {
|
|||||||
unsigned char len[AST_RED_MAX_GENERATION]; /*!< length of each generation */
|
unsigned char len[AST_RED_MAX_GENERATION]; /*!< length of each generation */
|
||||||
int num_gen; /*!< Number of generations */
|
int num_gen; /*!< Number of generations */
|
||||||
int schedid; /*!< Timer id */
|
int schedid; /*!< Timer id */
|
||||||
int ti; /*!< How long to buffer data before send */
|
|
||||||
unsigned char t140red_data[64000];
|
unsigned char t140red_data[64000];
|
||||||
unsigned char buf_data[64000]; /*!< buffered primary data */
|
unsigned char buf_data[64000]; /*!< buffered primary data */
|
||||||
int hdrlen;
|
int hdrlen;
|
||||||
@@ -9171,7 +9170,6 @@ static int rtp_red_init(struct ast_rtp_instance *instance, int buffer_time, int
|
|||||||
rtp->red->t140red = rtp->red->t140;
|
rtp->red->t140red = rtp->red->t140;
|
||||||
rtp->red->t140red.data.ptr = &rtp->red->t140red_data;
|
rtp->red->t140red.data.ptr = &rtp->red->t140red_data;
|
||||||
|
|
||||||
rtp->red->ti = buffer_time;
|
|
||||||
rtp->red->num_gen = generations;
|
rtp->red->num_gen = generations;
|
||||||
rtp->red->hdrlen = generations * 4 + 1;
|
rtp->red->hdrlen = generations * 4 + 1;
|
||||||
|
|
||||||
@@ -9181,7 +9179,7 @@ static int rtp_red_init(struct ast_rtp_instance *instance, int buffer_time, int
|
|||||||
rtp->red->t140red_data[x*4] = rtp->red->pt[x];
|
rtp->red->t140red_data[x*4] = rtp->red->pt[x];
|
||||||
}
|
}
|
||||||
rtp->red->t140red_data[x*4] = rtp->red->pt[x] = payloads[x]; /* primary pt */
|
rtp->red->t140red_data[x*4] = rtp->red->pt[x] = payloads[x]; /* primary pt */
|
||||||
rtp->red->schedid = ast_sched_add(rtp->sched, generations, red_write, instance);
|
rtp->red->schedid = ast_sched_add(rtp->sched, buffer_time, red_write, instance);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user