mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
examples: handle 0 stride better
Assume the stride is size/height in case someone doesn't set the stride correctly.
This commit is contained in:
parent
83f1de95c0
commit
8db85cf198
5 changed files with 10 additions and 0 deletions
|
|
@ -139,6 +139,8 @@ on_process(void *_data, struct spa_io_position *position)
|
|||
|
||||
/* copy video image in texture */
|
||||
sstride = buf->datas[0].chunk->stride;
|
||||
if (sstride == 0)
|
||||
sstride = buf->datas[0].chunk->size / data->position->video.size.height;
|
||||
|
||||
src = sdata;
|
||||
dst = ddata;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue