Make sure not to play data_kind 1 songs -- radio stations

This commit is contained in:
Ron Pedde 2006-07-26 05:44:54 +00:00
parent 0e84da1679
commit 63d6df105f
2 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -465,6 +465,11 @@ int plugin_ssc_should_transcode(WS_CONNINFO *pwsc, char *codec) {
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 */
native_codecs = ws_getrequestheader(pwsc,"accept-codecs");