aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mpg123_decoder_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-25 19:47:33 +0100
committerMax Kellermann <max@duempel.org>2009-12-26 03:01:43 +0100
commitbad350bc18ab81661253bf42245b9e3fa175d026 (patch)
tree47a1dd5d4b81520eb9ae1ce407d2fea84d71736f /src/decoder/mpg123_decoder_plugin.c
parent870436a592b081c4630b9ecc36ff8daecf6496cc (diff)
downloadmpd-bad350bc18ab81661253bf42245b9e3fa175d026.tar.gz
mpd-bad350bc18ab81661253bf42245b9e3fa175d026.tar.xz
mpd-bad350bc18ab81661253bf42245b9e3fa175d026.zip
decoder_api: added function decoder_timestamp()
Remove the data_time parameter from decoder_data(). This patch eliminates the timestamp counting in most decoder plugins, because the MPD core will do it automatically by default.
Diffstat (limited to '')
-rw-r--r--src/decoder/mpg123_decoder_plugin.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/decoder/mpg123_decoder_plugin.c b/src/decoder/mpg123_decoder_plugin.c
index 62e6b00b0..0d7cb9e0e 100644
--- a/src/decoder/mpg123_decoder_plugin.c
+++ b/src/decoder/mpg123_decoder_plugin.c
@@ -103,7 +103,7 @@ mpd_mpg123_file_decode(struct decoder *decoder, const char *path_fs)
struct audio_format audio_format;
mpg123_handle *handle;
int error;
- off_t num_samples, position;
+ off_t num_samples;
enum decoder_command cmd;
/* open the file */
@@ -134,8 +134,6 @@ mpd_mpg123_file_decode(struct decoder *decoder, const char *path_fs)
unsigned char buffer[8192];
size_t nbytes;
- position = mpg123_tell(handle);
-
/* decode */
error = mpg123_read(handle, buffer, sizeof(buffer), &nbytes);
@@ -149,8 +147,6 @@ mpd_mpg123_file_decode(struct decoder *decoder, const char *path_fs)
/* send to MPD */
cmd = decoder_data(decoder, NULL, buffer, nbytes,
- (float)position /
- (float)audio_format.sample_rate,
0, NULL);
/* seeking not yet implemented */