rtp: Restore reverse stream detection logic

This commit is contained in:
Kaian 2016-08-03 12:49:53 +02:00
parent 53b225b545
commit 35a51311df
1 changed files with 7 additions and 0 deletions

View File

@ -201,6 +201,13 @@ rtp_check_packet(packet_t *packet)
if (!(stream_is_complete(stream))) {
stream_complete(stream, src);
stream_set_format(stream, format);
// Check if an stream in the opposite direction exists
if (!(reverse = rtp_find_call_stream(stream->media->msg->call, stream->dst, stream->src))) {
reverse = stream_create(stream->media, stream->src, PACKET_RTP);
stream_complete(reverse, stream->dst);
stream_set_format(reverse, format);
call_add_stream(msg_get_call(stream->media->msg), reverse);
}
}
// Add packet to stream