MT#59038 specialise media_player_play_init

Separate out player setup from (re-) initialisation

Change-Id: I03c4d8c682f28b4f27e0f2fb92d8de8010d4ab23
pull/1808/head
Richard Fuchs 1 year ago
parent bd43cd5809
commit 9223109d04

@ -898,9 +898,7 @@ void media_player_set_media(struct media_player *mp, struct call_media *media) {
// call->master_lock held in W
// returns destination payload type, or NULL on failure
static const rtp_payload_type *media_player_play_init(struct media_player *mp) {
media_player_shutdown(mp);
static const rtp_payload_type *media_player_play_setup(struct media_player *mp) {
// find call media suitable for playback
struct call_media *media;
for (unsigned int i = 0; i < mp->ml->medias->len; i++) {
@ -923,6 +921,13 @@ found:
return media_player_get_dst_pt(mp);
}
// call->master_lock held in W
// returns destination payload type, or NULL on failure
static const rtp_payload_type *media_player_play_init(struct media_player *mp) {
media_player_shutdown(mp);
return media_player_play_setup(mp);
}
// call->master_lock held in W
static void media_player_play_start(struct media_player *mp, const rtp_payload_type *dst_pt) {

Loading…
Cancel
Save