Browse Source

MT#55283 pull forward creation of codec_handlers

This HT is needed when updating UDPTL/T.38 handlers, on both sides of
the call. Make sure the HT exists.

Change-Id: Ic85684bbd2a746ff490d06008eadfae664e9f8a9
pull/1692/head
Richard Fuchs 2 years ago
parent
commit
c109168bae
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      daemon/codec.c

+ 5
- 3
daemon/codec.c View File

@ -1013,6 +1013,11 @@ void codec_handlers_update(struct call_media *receiver, struct call_media *sink,
MEDIA_CLEAR(receiver, GENERATOR); MEDIA_CLEAR(receiver, GENERATOR);
MEDIA_CLEAR(sink, GENERATOR); MEDIA_CLEAR(sink, GENERATOR);
if (!receiver->codec_handlers)
receiver->codec_handlers = g_hash_table_new(__codec_handler_hash, __codec_handler_eq);
if (!sink->codec_handlers)
sink->codec_handlers = g_hash_table_new(__codec_handler_hash, __codec_handler_eq);
// non-RTP protocol? // non-RTP protocol?
if (proto_is(receiver->protocol, PROTO_UDPTL)) { if (proto_is(receiver->protocol, PROTO_UDPTL)) {
if (codec_handler_udptl_update(receiver, sink, flags)) { if (codec_handler_udptl_update(receiver, sink, flags)) {
@ -1029,9 +1034,6 @@ void codec_handlers_update(struct call_media *receiver, struct call_media *sink,
return; return;
} }
if (!receiver->codec_handlers)
receiver->codec_handlers = g_hash_table_new(__codec_handler_hash, __codec_handler_eq);
// should we transcode to a non-RTP protocol? // should we transcode to a non-RTP protocol?
if (proto_is_not_rtp(sink->protocol)) { if (proto_is_not_rtp(sink->protocol)) {
if (codec_handler_non_rtp_update(receiver, sink, flags, sp)) { if (codec_handler_non_rtp_update(receiver, sink, flags, sp)) {


Loading…
Cancel
Save