int firstpass = 0;
int ret = -1;
int x;
- int menu_active = 0;
+ int menu_active = 0;
+ int using_pseudo = 0;
struct ast_app *app;
char *agifile;
ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
goto outrun;
}
+ using_pseudo = 1;
/* Make non-blocking */
flags = fcntl(fd, F_GETFL);
if (flags < 0) {
}
}
}
- if (fd != chan->fds[0])
+ if (using_pseudo)
close(fd);
else {
/* Take out of conference */
rtp->lastividtimestamp = timestamp;
rtp->f.samples = timestamp - rtp->lastividtimestamp;
rtp->lastividtimestamp = timestamp;
+ rtp->f.delivery.tv_sec = 0;
+ rtp->f.delivery.tv_usec = 0;
if (mark)
rtp->f.subclass |= 0x1;
/* Re-calculate last TS */
rtp->lastts = rtp->lastts + ms * 90;
/* If it's close to our prediction, go for it */
- if (abs(rtp->lastts - pred) < 7200) {
- rtp->lastts = pred;
- rtp->lastovidtimestamp += f->samples;
- } else {
- ast_log(LOG_DEBUG, "Difference is %d, ms is %d\n", abs(rtp->lastts - pred), ms);
- rtp->lastovidtimestamp = rtp->lastts;
+ if (!f->delivery.tv_sec && !f->delivery.tv_usec) {
+ if (abs(rtp->lastts - pred) < 7200) {
+ rtp->lastts = pred;
+ rtp->lastovidtimestamp += f->samples;
+ } else {
+ ast_log(LOG_DEBUG, "Difference is %d, ms is %d (%d), pred/ts/samples %d/%d/%d\n", abs(rtp->lastts - pred), ms, ms * 90, rtp->lastts, pred, f->samples);
+ rtp->lastovidtimestamp = rtp->lastts;
+ }
}
}
/* Get a pointer to the header */