diff --git a/transports.c b/transports.c index 9079627d..48da6471 100644 --- a/transports.c +++ b/transports.c @@ -438,3 +438,15 @@ transport_set_priority(th_transport_t *t, int prio) t->tht_prio = prio; LIST_INSERT_SORTED(&ch->ch_transports, t, tht_channel_link, transportcmp); } + + +/** + * + */ +void +transport_move(th_transport_t *t, th_channel_t *ch) +{ + LIST_REMOVE(t, tht_channel_link); + t->tht_channel = ch; + LIST_INSERT_SORTED(&ch->ch_transports, t, tht_channel_link, transportcmp); +} diff --git a/transports.h b/transports.h index b32ce758..246bd31b 100644 --- a/transports.h +++ b/transports.h @@ -38,4 +38,6 @@ th_stream_t *transport_add_stream(th_transport_t *t, int pid, void transport_set_priority(th_transport_t *t, int prio); +void transport_move(th_transport_t *t, th_channel_t *ch); + #endif /* TRANSPORTS_H */