diff options
author | Max Kellermann <max@duempel.org> | 2008-11-02 14:18:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-02 14:18:34 +0100 |
commit | 30fca5e5a9c26bf73a24ae5710f8d9d21be49011 (patch) | |
tree | 31b47ff6b594b807bdd81589543fbc5bace812a5 /src | |
parent | fd0f195bb778db55d900c5225fac4d89b1a16af5 (diff) | |
download | mpd-30fca5e5a9c26bf73a24ae5710f8d9d21be49011.tar.gz mpd-30fca5e5a9c26bf73a24ae5710f8d9d21be49011.tar.xz mpd-30fca5e5a9c26bf73a24ae5710f8d9d21be49011.zip |
music_pipe: pass frame size to tail_chunk()
Don't make tail_chunk() calculate the frame size again.
Diffstat (limited to '')
-rw-r--r-- | src/pipe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pipe.c b/src/pipe.c index b6912b5fa..db463f7a5 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -154,9 +154,8 @@ music_pipe_get_chunk(const unsigned i) * room. */ static struct music_chunk * -tail_chunk(float data_time, uint16_t bitRate) +tail_chunk(float data_time, uint16_t bitRate, size_t frame_size) { - const size_t frame_size = audio_format_frame_size(&ob.audioFormat); unsigned int next; struct music_chunk *chunk; @@ -197,7 +196,7 @@ size_t music_pipe_append(const void *data0, size_t datalen, assert((datalen % frame_size) == 0); while (datalen) { - chunk = tail_chunk(data_time, bitRate); + chunk = tail_chunk(data_time, bitRate, frame_size); if (chunk == NULL) return ret; |