[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] sound-file-stream: Fix crash when playing a file which is not aligned

PulseAudio Marge Bot (@pulseaudio-merge-bot) gitlab at gitlab.freedesktop.org
Mon Jun 13 19:06:30 UTC 2022



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
a8a2a314 by Jaechul Lee at 2022-06-09T11:18:48+09:00
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 at samsung.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/717>

- - - - -


1 changed file:

- src/pulsecore/sound-file-stream.c


Changes:

=====================================
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);
     }
 



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/a8a2a31408c4acf54530d65922d235d3e590ce05

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/a8a2a31408c4acf54530d65922d235d3e590ce05
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20220613/7156424f/attachment.htm>


More information about the pulseaudio-commits mailing list