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.
This commit is contained in:
Max Kellermann
2009-12-25 19:47:33 +01:00
parent 870436a592
commit bad350bc18
22 changed files with 73 additions and 83 deletions

View File

@@ -119,7 +119,7 @@ sndfile_stream_decode(struct decoder *decoder, struct input_stream *is)
SF_INFO info;
struct audio_format audio_format;
size_t frame_size;
sf_count_t read_frames, num_frames, position = 0;
sf_count_t read_frames, num_frames;
int buffer[4096];
enum decoder_command cmd;
@@ -155,7 +155,6 @@ sndfile_stream_decode(struct decoder *decoder, struct input_stream *is)
cmd = decoder_data(decoder, is,
buffer, num_frames * frame_size,
frame_to_time(position, &audio_format),
0, NULL);
if (cmd == DECODE_COMMAND_SEEK) {
sf_count_t c =