refactoring

This commit is contained in:
Maxim Devaev
2022-11-03 19:09:17 +03:00
parent a24e0eeb86
commit 335f19f0e3
2 changed files with 9 additions and 7 deletions

View File

@@ -102,11 +102,11 @@ static void *_common_thread(void *v_client, bool video) {
packet.video = rtp->video;
packet.buffer = (char *)rtp->datagram;
packet.length = rtp->used;
#if JANUS_PLUGIN_API_VERSION >= 100
# if JANUS_PLUGIN_API_VERSION >= 100
// The uStreamer Janus plugin places video in stream index 0 and audio
// (if available) in stream index 1.
packet.mindex = (rtp->video ? 0 : 1);
#endif
# endif
janus_plugin_rtp_extensions_reset(&packet.extensions);
// FIXME: Это очень эффективный способ уменьшить задержку, но WebRTC стек в хроме и фоксе
// слишком корявый, чтобы обработать это, из-за чего на кейфреймах начинаются заикания.