diff options
author | Jaechul Lee <jcsing.lee@samsung.com> | 2022-06-02 15:07:09 +0900 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2022-06-20 14:01:47 +0300 |
commit | 437cfe4630778c9b00cab168d678d17f74577baa (patch) | |
tree | 9ad63d784624a9039b1629751473f39e3bc4f69b | |
parent | 8299a7f100f3a061fa0700e8b320bb525ad557d8 (diff) | |
download | pulseaudio-437cfe4630778c9b00cab168d678d17f74577baa.tar.gz |
sound-file-stream: Fix crash when playing a file which is not aligned
pulseaudio crash occurred when I play a file using pacmd play-file command.
The file is not aligned with its frame size and the last rendering size
is also not aligned. Thus, an assertion was generated at the end of the
file as the following.
memblockq.c: Assertion 'uchunk->length % bq->base == 0' failed at
../src/pulsecore/memblockq.c:288, function pa_memblockq_push(). Aborting.
When I play the file using paplay, it works good. So, I changed to
pa_memblockq_push_align instead of pa_memblockq_push to prevent the
assertion.
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/717>
-rw-r--r-- | src/pulsecore/sound-file-stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c index 147aa2288..255f4b61a 100644 --- a/src/pulsecore/sound-file-stream.c +++ b/src/pulsecore/sound-file-stream.c @@ -185,7 +185,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk tchunk.length = (size_t) n * fs; - pa_memblockq_push(u->memblockq, &tchunk); + pa_memblockq_push_align(u->memblockq, &tchunk); pa_memblock_unref(tchunk.memblock); } |