aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/faad_decoder_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-24 19:14:40 +0100
committerMax Kellermann <max@duempel.org>2013-01-26 01:24:01 +0100
commit0273cd44b0b50d5d320ce88cc1472e0d8ee8e529 (patch)
tree7c493850ab07deddd637ca0b5e8b3476e40a68fc /src/decoder/faad_decoder_plugin.c
parent3203a7dd8ce8db6afcc54d68d63b4f4af7dc4c7f (diff)
downloadmpd-0273cd44b0b50d5d320ce88cc1472e0d8ee8e529.tar.gz
mpd-0273cd44b0b50d5d320ce88cc1472e0d8ee8e529.tar.xz
mpd-0273cd44b0b50d5d320ce88cc1472e0d8ee8e529.zip
input_stream: forward-declare the struct
Hide the definition from C code, to prepare the transition to C++.
Diffstat (limited to 'src/decoder/faad_decoder_plugin.c')
-rw-r--r--src/decoder/faad_decoder_plugin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/decoder/faad_decoder_plugin.c b/src/decoder/faad_decoder_plugin.c
index 911f033b8..c8dbb966c 100644
--- a/src/decoder/faad_decoder_plugin.c
+++ b/src/decoder/faad_decoder_plugin.c
@@ -175,7 +175,8 @@ faad_song_duration(struct decoder_buffer *buffer, struct input_stream *is)
size_t length;
bool success;
- fileread = is->size >= 0 ? is->size : 0;
+ const goffset size = input_stream_get_size(is);
+ fileread = size >= 0 ? size : 0;
decoder_buffer_fill(buffer);
data = decoder_buffer_read(buffer, &length);
@@ -201,7 +202,7 @@ faad_song_duration(struct decoder_buffer *buffer, struct input_stream *is)
return -1;
}
- if (is->seekable && length >= 2 &&
+ if (input_stream_is_seekable(is) && length >= 2 &&
data[0] == 0xFF && ((data[1] & 0xF6) == 0xF0)) {
/* obtain the duration from the ADTS header */
float song_length = adts_song_duration(buffer);