diff --git a/daemon/media_socket.c b/daemon/media_socket.c index a01e2d4e2..dd266541f 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1330,13 +1330,14 @@ void kernelize(struct packet_stream *stream) { } } - if (reti.local.family) { - kernel_add_stream(&reti); - struct rtpengine_destination_info *redi; - while ((redi = g_queue_pop_head(&outputs))) { - kernel_add_destination(redi); - g_slice_free1(sizeof(*redi), redi); - } + if (!reti.local.family) + goto no_kernel; + + kernel_add_stream(&reti); + struct rtpengine_destination_info *redi; + while ((redi = g_queue_pop_head(&outputs))) { + kernel_add_destination(redi); + g_slice_free1(sizeof(*redi), redi); } PS_SET(stream, KERNELIZED); @@ -1482,6 +1483,8 @@ void media_update_stats(struct call_media *m) { continue; if (!PS_ISSET(ps, KERNELIZED)) continue; + if (PS_ISSET(ps, NO_KERNEL_SUPPORT)) + continue; __stream_update_stats(ps, 0); }