aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-02 17:01:51 +0100
committerMax Kellermann <max@duempel.org>2008-11-02 17:01:51 +0100
commitc9e15bc418d4a27305b39ccc63e631ac5e329c8b (patch)
tree0e97c8b6c829f464374d3b2cbcbc3fb01e4bebe4 /src/decoder/ffmpeg_plugin.c
parentc7a374bdcbe85a794b047c638e57b9358d2d095b (diff)
downloadmpd-c9e15bc418d4a27305b39ccc63e631ac5e329c8b.tar.gz
mpd-c9e15bc418d4a27305b39ccc63e631ac5e329c8b.tar.xz
mpd-c9e15bc418d4a27305b39ccc63e631ac5e329c8b.zip
decoder_api: pass "seekable" flag to decoder_initialized()
Don't pass the "seekable" flag with every decoder_data() invocation. Since that flag won't change within the file, it is enough to pass it to decoder_initialized() once per file.
Diffstat (limited to 'src/decoder/ffmpeg_plugin.c')
-rw-r--r--src/decoder/ffmpeg_plugin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 6f7b2e1e1..5137d412f 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -239,7 +239,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
assert(audio_size >= 0);
- return decoder_data(decoder, is, is->seekable,
+ return decoder_data(decoder, is,
audio_buf, audio_size,
position,
codec_context->bit_rate / 1000, NULL);
@@ -271,7 +271,8 @@ ffmpeg_decode_internal(BasePtrs *base)
total_time = pFormatCtx->duration / AV_TIME_BASE;
}
- decoder_initialized(decoder, &audio_format, total_time);
+ decoder_initialized(decoder, &audio_format,
+ base->input->seekable, total_time);
do {
if (av_read_frame(pFormatCtx, &packet) < 0)