player: don't play empty chunks
An empty chunk may happen when it only contains a tag, but no PCM data. Don't call playAudio() then.
This commit is contained in:
parent
e5137706d1
commit
cc164cc884
|
@ -236,6 +236,9 @@ playChunk(struct song *song, struct music_chunk *chunk,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chunk->length == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
pcm_volume(chunk->data, chunk->length,
|
pcm_volume(chunk->data, chunk->length,
|
||||||
format, pc.softwareVolume);
|
format, pc.softwareVolume);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue