diff --git a/src/dispatch.c b/src/dispatch.c index b4ba007d..2b04ee89 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -788,6 +788,10 @@ void dispatch_stream_id(WS_CONNINFO *pwsc, int session, char *id) { /********************** * stream file normally **********************/ + if(pmp3->data_kind != 0) { + ws_returnerror(pwsc,500,"Can't stream radio station"); + return; + } file_fd=r_open2(pmp3->path,O_RDONLY); if(file_fd == -1) { pwsc->error=errno; diff --git a/src/plugin.c b/src/plugin.c index 30e4abaa..e6d3c69c 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -464,6 +464,11 @@ int plugin_ssc_should_transcode(WS_CONNINFO *pwsc, char *codec) { int result; char *native_codecs=NULL; char *user_agent=NULL; + + if(!codec) { + DPRINTF(E_LOG,L_PLUG,"testing transcode on null codec?\n"); + return FALSE; + } if(pwsc) { /* see if the headers give us any guidance */