tech_pvt->mparams->inbound_codec_string = switch_core_session_strdup(tech_pvt->session, profile->inbound_codec_string);
tech_pvt->mparams->outbound_codec_string = switch_core_session_strdup(tech_pvt->session, profile->outbound_codec_string);
- tech_pvt->mparams->jb_msec = "-1";
+ tech_pvt->mparams->jb_msec = "1p:50p";
switch_media_handle_set_media_flag(tech_pvt->smh, SCMF_SUPPRESS_CNG);
//tech_pvt->mparams->auto_rtp_bugs = profile->auto_rtp_bugs;
if (strchr(val, 'p') && jb_msec > 0) {
jb_msec *= -1;
+ if (!maxlen) maxlen = jb_msec * 50;
}
if ((p = strchr(val, ':'))) {
}
}
+ if (!maxlen) maxlen = jb_msec * 50;
+
if (jb_msec < 0 && jb_msec > -1000) {
jb_msec = (a_engine->read_codec.implementation->microseconds_per_packet / 1000) * abs(jb_msec);
}
if (maxlen < 0 && maxlen > -1000) {
maxlen = (a_engine->read_codec.implementation->microseconds_per_packet / 1000) * abs(maxlen);
}
-
if (jb_msec < 10 || jb_msec > 10000) {
fps = video_globals.fps;
- if (!fps) return;
+ if (fps < 15) return;
sync_audio = 1;
jb_sync_msec, frames, video_globals.fps, sync_audio ? "yes" : "no", jb_sync_msec);
if (sync_audio) {
- check_jb(session, NULL, jb_sync_msec, 0, SWITCH_TRUE);
+ check_jb(session, NULL, jb_sync_msec, jb_sync_msec * 2, SWITCH_TRUE);
}
video_globals.synced++;