Commit 78b08f03 authored by Max Kellermann's avatar Max Kellermann

decoder_api: don't cast need_chunks() to int

need_chunks() returns a decoder_command enum. Store its return value as this type.
parent a0b57f37
...@@ -165,7 +165,6 @@ decoder_data(struct decoder *decoder, ...@@ -165,7 +165,6 @@ decoder_data(struct decoder *decoder,
size_t datalen; size_t datalen;
static char *convBuffer; static char *convBuffer;
static size_t convBufferLen; static size_t convBufferLen;
int ret;
if (audio_format_equals(&ob.audioFormat, &dc.audioFormat)) { if (audio_format_equals(&ob.audioFormat, &dc.audioFormat)) {
data = dataIn; data = dataIn;
...@@ -196,9 +195,10 @@ decoder_data(struct decoder *decoder, ...@@ -196,9 +195,10 @@ decoder_data(struct decoder *decoder,
data += nbytes; data += nbytes;
if (datalen > 0) { if (datalen > 0) {
ret = need_chunks(decoder, inStream, seekable); enum decoder_command cmd =
if (ret != 0) need_chunks(decoder, inStream, seekable);
return ret; if (cmd != DECODE_COMMAND_NONE)
return cmd;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment