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");
|
native_codecs = ws_getrequestheader(pwsc,"accept-codecs");
|
||||||
if(!native_codecs) {
|
if(!native_codecs) {
|
||||||
user_agent = ws_getrequestheader(pwsc,"user-agent");
|
user_agent = ws_getrequestheader(pwsc,"user-agent");
|
||||||
if(strncmp(user_agent,"iTunes",6)==0) {
|
if(user_agent) {
|
||||||
native_codecs = "mpeg,mp4a,wav,mp4v,alac";
|
if(strncmp(user_agent,"iTunes",6)==0) {
|
||||||
} else if(strncmp(user_agent,"Roku",4)==0) {
|
native_codecs = "mpeg,mp4a,wav,mp4v,alac";
|
||||||
native_codecs = "mpeg,mp4a,wav,wma";
|
} else if(strncmp(user_agent,"Roku",4)==0) {
|
||||||
|
native_codecs = "mpeg,mp4a,wav,wma";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue