fix for issue #496 (switch from mirror mode to hls)

This commit is contained in:
F. Duncanh
2026-02-07 16:06:02 -05:00
parent b8518932ad
commit 6a5dfc3fde
3 changed files with 5 additions and 2 deletions

View File

@@ -179,6 +179,7 @@ http_handler_set_property(raop_conn_t *conn,
*/ */
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop); airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
assert(airplay_video);
if (!strcmp(property, "selectedMediaArray")) { if (!strcmp(property, "selectedMediaArray")) {
/* verify that this request contains a binary plist*/ /* verify that this request contains a binary plist*/
char *header_str = NULL; char *header_str = NULL;
@@ -467,6 +468,7 @@ http_handler_action(raop_conn_t *conn, http_request_t *request, http_response_t
raop_t *raop = conn->raop; raop_t *raop = conn->raop;
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop); airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
assert(airplay_video);
bool data_is_plist = false; bool data_is_plist = false;
plist_t req_root_node = NULL; plist_t req_root_node = NULL;
uint64_t uint_val = 0; uint64_t uint_val = 0;
@@ -964,6 +966,7 @@ http_handler_hls(raop_conn_t *conn, http_request_t *request, http_response_t *r
return; return;
} }
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop); airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
assert(airplay_video);
if (!strcmp(url, "/master.m3u8")){ if (!strcmp(url, "/master.m3u8")){
char * master_playlist = get_master_playlist(airplay_video); char * master_playlist = get_master_playlist(airplay_video);
if (master_playlist) { if (master_playlist) {

View File

@@ -946,6 +946,7 @@ raop_handler_setup(raop_conn_t *conn,
switch (type) { switch (type) {
case 110: { case 110: {
// Mirroring // Mirroring
raop_destroy_airplay_video(raop, -1); //cleanup any hls data still present when mirror video starts
unsigned short dport = raop->mirror_data_lport; unsigned short dport = raop->mirror_data_lport;
plist_t stream_id_node = plist_dict_get_item(req_stream_node, "streamConnectionID"); plist_t stream_id_node = plist_dict_get_item(req_stream_node, "streamConnectionID");
uint64_t stream_connection_id = 0; uint64_t stream_connection_id = 0;

View File

@@ -3225,7 +3225,6 @@ int main (int argc, char *argv[]) {
if (use_video && (close_window || preserve_connections)) { if (use_video && (close_window || preserve_connections)) {
video_renderer_destroy(); video_renderer_destroy();
if (!preserve_connections) { if (!preserve_connections) {
raop_destroy_airplay_video(raop, -1);
url.erase(); url.erase();
raop_remove_known_connections(raop); raop_remove_known_connections(raop);
} }