aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/decode.c b/src/decode.c
index 92f01a393..97896f67d 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -53,6 +53,18 @@ static void decodeStart(void)
dc.state = DECODE_STATE_START;
dc.command = DECODE_COMMAND_NONE;
+ /* wait for the input stream to become ready; its metadata
+ will be available then */
+
+ while (!inStream.ready) {
+ if (dc.command != DECODE_COMMAND_NONE)
+ goto stop;
+
+ ret = bufferInputStream(&inStream);
+ if (ret < 0)
+ goto stop;
+ }
+
/* for http streams, seekable is determined in bufferInputStream */
dc.seekable = inStream.seekable;