mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 22:55:56 -05:00
Fix crash on no user-agent, fixing ticket #164
This commit is contained in:
parent
c926c05c6e
commit
5859bca5ac
10
src/plugin.c
10
src/plugin.c
@ -588,10 +588,12 @@ int plugin_ssc_should_transcode(WS_CONNINFO *pwsc, char *codec) {
|
||||
native_codecs = ws_getrequestheader(pwsc,"accept-codecs");
|
||||
if(!native_codecs) {
|
||||
user_agent = ws_getrequestheader(pwsc,"user-agent");
|
||||
if(strncmp(user_agent,"iTunes",6)==0) {
|
||||
native_codecs = "mpeg,mp4a,wav,mp4v,alac";
|
||||
} else if(strncmp(user_agent,"Roku",4)==0) {
|
||||
native_codecs = "mpeg,mp4a,wav,wma";
|
||||
if(user_agent) {
|
||||
if(strncmp(user_agent,"iTunes",6)==0) {
|
||||
native_codecs = "mpeg,mp4a,wav,mp4v,alac";
|
||||
} else if(strncmp(user_agent,"Roku",4)==0) {
|
||||
native_codecs = "mpeg,mp4a,wav,wma";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user