aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-09-10 07:12:42 +0000
committerEric Wong <normalperson@yhbt.net>2007-09-10 07:12:42 +0000
commit8b141ae54edabf1fd020b5b81412ccca774ef89c (patch)
treed6772ae56a37f6b5da8a7ebd1a10cae069baaade
parent54339dfbc2e32536c420942e0fc3c8fad733f455 (diff)
downloadmpd-8b141ae54edabf1fd020b5b81412ccca774ef89c.tar.gz
mpd-8b141ae54edabf1fd020b5b81412ccca774ef89c.tar.xz
mpd-8b141ae54edabf1fd020b5b81412ccca774ef89c.zip
buffer input while waiting for outputBuffer space in mp4 and (ogg)flac
Both mp4 and (ogg)flac inputPlugins got HTTP inputStream support later in the game, so their calls to sendDataToOutputBuffer() didn't get updated to support buffering while the outputBuffer was full. This fixes it. git-svn-id: https://svn.musicpd.org/mpd/trunk@6873 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/_flac_common.h3
-rw-r--r--src/inputPlugins/mp4_plugin.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h
index e04e70693..df96d9f9c 100644
--- a/src/inputPlugins/_flac_common.h
+++ b/src/inputPlugins/_flac_common.h
@@ -172,7 +172,8 @@ MpdTag *copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block,
/* keep this inlined, this is just macro but prettier :) */
static inline int flacSendChunk(FlacData * data)
{
- if (sendDataToOutputBuffer(data->cb, NULL, data->dc, 1, data->chunk,
+ if (sendDataToOutputBuffer(data->cb, data->inStream,
+ data->dc, 1, data->chunk,
data->chunk_length, data->time,
data->bitRate,
data->replayGainInfo) ==
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c
index 11d634ff2..2426d3b2b 100644
--- a/src/inputPlugins/mp4_plugin.c
+++ b/src/inputPlugins/mp4_plugin.c
@@ -285,7 +285,7 @@ static int mp4_decode(OutputBuffer * cb, DecoderControl * dc,
sampleBuffer += offset * channels * 2;
- sendDataToOutputBuffer(cb, NULL, dc, 1, sampleBuffer,
+ sendDataToOutputBuffer(cb, inStream, dc, 1, sampleBuffer,
sampleBufferLen, time, bitRate, NULL);
if (dc->stop) {
eof = 1;