stream_lavf: don't add ffmpeg bluray or dvd protocols

The naming of these conflict with existing mpv protocols, so skip if we
get them. Users can still use them via lavf://bluray: or lavf://dvd: if
they wish.
This commit is contained in:
Dudemanguy 2024-05-22 10:27:40 -05:00
parent 056b03f9ed
commit 7b77672794
1 changed files with 4 additions and 0 deletions

View File

@ -314,6 +314,10 @@ static char **get_unsafe_protocols(void)
break;
}
}
// Skip to avoid name conflict with builtin mpv protocol.
if (strcmp(ffmpeg_protos[i], "bluray") == 0 || strcmp(ffmpeg_protos[i], "dvd") == 0)
continue;
if (!safe_protocol)
MP_TARRAY_APPEND(NULL, protocols, num, talloc_strdup(protocols, ffmpeg_protos[i]));
}