cause the timestamp field of the RTP header to be invalid.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139151
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
struct pvt {
int fd;
int fake;
- unsigned int g729b_warning:1;
-#ifdef DEBUG_TRANSCODE
- int totalms;
- int lasttotalms;
-#endif
+ int samples;
struct dahdi_transcoder_formats fmts;
};
return NULL;
}
} else {
- pvt->f.samples = res;
+ pvt->f.samples = ztp->samples;
pvt->f.datalen = res;
pvt->datalen = 0;
pvt->f.frametype = AST_FRAME_VOICE;
switch (ztp->fmts.dstfmt) {
case AST_FORMAT_G729A:
+ ztp->samples = 160;
+ break;
+ case AST_FORMAT_G723_1:
+ ztp->samples = 240;
+ break;
+ default:
+ ztp->samples = 160;
+ break;
+ };
+
+ switch (ztp->fmts.dstfmt) {
+ case AST_FORMAT_G729A:
+ ast_atomic_fetchadd_int(&channels.encoders, +1);
+ break;
case AST_FORMAT_G723_1:
ast_atomic_fetchadd_int(&channels.encoders, +1);
break;