aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-02 17:06:53 +0100
committerMax Kellermann <max@duempel.org>2008-11-02 17:06:53 +0100
commit0f80428fdac074a5bf17a70d25c909d503594bf6 (patch)
treee7e39d1b77662a24519ff73b9217dae2b2294b0e /src/decoder/ffmpeg_plugin.c
parent4d069b49919da991482ec46daacde62113dad7e8 (diff)
downloadmpd-0f80428fdac074a5bf17a70d25c909d503594bf6.tar.gz
mpd-0f80428fdac074a5bf17a70d25c909d503594bf6.tar.xz
mpd-0f80428fdac074a5bf17a70d25c909d503594bf6.zip
ffmpeg: use decoder_read() wrapper instead of direct input_stream_read()
decoder_read() checks the decoder command. Without this patch, the ffmpeg plugin could become unresponsive.
Diffstat (limited to 'src/decoder/ffmpeg_plugin.c')
-rw-r--r--src/decoder/ffmpeg_plugin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 96ea2e5be..2be97f62a 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -86,7 +86,8 @@ static int mpdurl_read(URLContext *h, unsigned char *buf, int size)
FopsHelper *base = (FopsHelper *) h->priv_data;
while (true) {
- size_t ret = input_stream_read(base->input, (void *)buf, size);
+ size_t ret = decoder_read(base->decoder, base->input,
+ (void *)buf, size);
if (ret > 0)
return ret;