aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 19:09:20 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 19:09:20 +0100
commit5024f0b6cc5151b28cc2e7be1648c2664595e86e (patch)
tree2494b711f11dfad3c82d353f74b0db6d8bdac8a8 /src
parentb15c4cdeb5c65f3f8a4588a8c0ccba537a4f7436 (diff)
downloadmpd-5024f0b6cc5151b28cc2e7be1648c2664595e86e.tar.gz
mpd-5024f0b6cc5151b28cc2e7be1648c2664595e86e.tar.xz
mpd-5024f0b6cc5151b28cc2e7be1648c2664595e86e.zip
ffmpeg: pass input_stream pointer to decoder_data()
decoder_data() uses wait times to let the input stream continue its transfer.
Diffstat (limited to '')
-rw-r--r--src/decoder/ffmpeg_plugin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 57e7325c4..dde06f4d3 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -214,7 +214,8 @@ ffmpeg_try_decode(struct input_stream *input)
}
static enum decoder_command
-ffmpeg_send_packet(struct decoder *decoder, const AVPacket *packet,
+ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
+ const AVPacket *packet,
AVCodecContext *codec_context,
const AVRational *time_base)
{
@@ -238,7 +239,7 @@ ffmpeg_send_packet(struct decoder *decoder, const AVPacket *packet,
assert(audio_size >= 0);
- return decoder_data(decoder, NULL, 1,
+ return decoder_data(decoder, is, is->seekable,
audio_buf, audio_size,
position,
codec_context->bit_rate / 1000, NULL);
@@ -278,7 +279,8 @@ ffmpeg_decode_internal(BasePtrs *base)
break;
if (packet.stream_index == base->audioStream)
- cmd = ffmpeg_send_packet(decoder, &packet, aCodecCtx,
+ cmd = ffmpeg_send_packet(decoder, base->input,
+ &packet, aCodecCtx,
&pFormatCtx->streams[base->audioStream]->time_base);
else
cmd = decoder_get_command(decoder);