eliminate OUTPUT_BUFFER_DC_STOP, OUTPUT_BUFFER_DC_SEEK
(Ab)use the decoder_command enumeration, which has nearly the same values and the same meaning.
This commit is contained in:
@@ -171,7 +171,7 @@ static inline int flacSendChunk(FlacData * data)
|
||||
1, data->chunk,
|
||||
data->chunk_length, data->time,
|
||||
data->bitRate,
|
||||
data->replayGainInfo) == OUTPUT_BUFFER_DC_STOP)
|
||||
data->replayGainInfo) == DECODE_COMMAND_STOP)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -927,21 +927,22 @@ static int mp3Read(mp3DecodeData * data, struct decoder *decoder,
|
||||
}
|
||||
|
||||
if (data->outputPtr >= data->outputBufferEnd) {
|
||||
ret = decoder_data(decoder, data->inStream,
|
||||
enum decoder_command cmd;
|
||||
cmd = decoder_data(decoder, data->inStream,
|
||||
data->inStream->seekable,
|
||||
data->outputBuffer,
|
||||
data->outputPtr - data->outputBuffer,
|
||||
data->elapsedTime,
|
||||
data->bitRate / 1000,
|
||||
(replayGainInfo != NULL) ? *replayGainInfo : NULL);
|
||||
if (ret == OUTPUT_BUFFER_DC_STOP) {
|
||||
if (cmd == DECODE_COMMAND_STOP) {
|
||||
data->flush = 0;
|
||||
return DECODE_BREAK;
|
||||
}
|
||||
|
||||
data->outputPtr = data->outputBuffer;
|
||||
|
||||
if (ret == OUTPUT_BUFFER_DC_SEEK)
|
||||
if (cmd == DECODE_COMMAND_STOP)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user