decoder/opus: simplify indentation in HandleAudio()
This commit is contained in:
parent
46eab05045
commit
4244e61214
@ -250,11 +250,14 @@ MPDOpusDecoder::HandleAudio(const ogg_packet &packet)
|
|||||||
packet.bytes,
|
packet.bytes,
|
||||||
output_buffer, opus_output_buffer_frames,
|
output_buffer, opus_output_buffer_frames,
|
||||||
0);
|
0);
|
||||||
|
if (gcc_unlikely(nframes <= 0)) {
|
||||||
if (nframes < 0)
|
if (nframes < 0)
|
||||||
throw FormatRuntimeError("libopus error: %s",
|
throw FormatRuntimeError("libopus error: %s",
|
||||||
opus_strerror(nframes));
|
opus_strerror(nframes));
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (nframes > 0) {
|
|
||||||
/* apply the "skip" value */
|
/* apply the "skip" value */
|
||||||
if (skip >= (unsigned)nframes) {
|
if (skip >= (unsigned)nframes) {
|
||||||
skip -= nframes;
|
skip -= nframes;
|
||||||
@ -278,7 +281,6 @@ MPDOpusDecoder::HandleAudio(const ogg_packet &packet)
|
|||||||
client.SubmitTimestamp(FloatDuration(packet.granulepos - pre_skip)
|
client.SubmitTimestamp(FloatDuration(packet.granulepos - pre_skip)
|
||||||
/ opus_sample_rate);
|
/ opus_sample_rate);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MPDOpusDecoder::Seek(uint64_t where_frame)
|
MPDOpusDecoder::Seek(uint64_t where_frame)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user