From 000e053ce73f6f87bc7c3797caceb1b60e467dcf Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Mon, 31 May 2004 11:42:46 +0000 Subject: icynames are now copied to title of streams git-svn-id: https://svn.musicpd.org/mpd/trunk@1258 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/audiofile_plugin.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/inputPlugins/audiofile_plugin.c') diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c index 8c1089e1b..5fe1a5ccd 100644 --- a/src/inputPlugins/audiofile_plugin.c +++ b/src/inputPlugins/audiofile_plugin.c @@ -51,21 +51,21 @@ int getAudiofileTotalTime(char * file) return time; } -int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) { +int audiofile_decode(OutputBuffer * cb, DecoderControl * dc, char * path) { int fs, frame_count; AFfilehandle af_fp; int bits; mpd_uint16 bitRate; struct stat st; - if(stat(dc->file,&st) < 0) { - ERROR("failed to stat: %s\n",dc->file); + if(stat(path, &st) < 0) { + ERROR("failed to stat: %s\n", path); return -1; } - af_fp = afOpenFile(dc->file,"r", NULL); + af_fp = afOpenFile(path, "r", NULL); if(af_fp == AF_NULL_FILEHANDLE) { - ERROR("failed to open: %s\n",dc->file); + ERROR("failed to open: %s\n", path); return -1; } @@ -83,7 +83,7 @@ int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) { if (dc->audioFormat.bits != 8 && dc->audioFormat.bits != 16) { ERROR("Only 8 and 16-bit files are supported. %s is %i-bit\n", - dc->file,dc->audioFormat.bits); + path, dc->audioFormat.bits); afCloseFile(af_fp); return -1; } -- cgit v1.2.3