Closed GenghisKhanDrip closed 5 months ago
there is a bug in your casting.c @GenghisKhanDrip
char protocol[length];
strncpy(protocol, cast->playback_location, length);
printf("Result: %s\n", protocol);
char* hostname1 = "localhost:";
char* hostname = malloc(strlen(hostname1) + strlen(cast->port));
strcpy(hostname, hostname1);
concatenate_string(hostname, cast->port);
str_replace(cast->playback_location, protocol, "http");
str_replace(cast->playback_location, "127.0.0.1", hostname);
str_replace(cast->playback_location, "localhost", hostname);
printf("String is %s\n", cast->playback_location);
the printf result shows that this does NOT replace "mlhls" by "http" in playback_location
fixed your bug. see latest commit here.
These changes allow UxPlay to implement video casting into its server, and contains the ability to parse URLs sent by the client for information. Still needed: