Fix crash on no user-agent, fixing ticket #164
This commit is contained in:
parent
c926c05c6e
commit
5859bca5ac
|
@ -588,6 +588,7 @@ 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(user_agent) {
|
||||
if(strncmp(user_agent,"iTunes",6)==0) {
|
||||
native_codecs = "mpeg,mp4a,wav,mp4v,alac";
|
||||
} else if(strncmp(user_agent,"Roku",4)==0) {
|
||||
|
@ -595,6 +596,7 @@ int plugin_ssc_should_transcode(WS_CONNINFO *pwsc, char *codec) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!native_codecs) {
|
||||
native_codecs = "mpeg,wav";
|
||||
|
|
Loading…
Reference in New Issue