Porting to SDL2 - V4L2 Buffer Problem |
IshtarUK
|
*** UPDATE ***
I seem to have this working now. The reason I was getting a segfault was due to not allocating my void * buffer. I added the following line and suddenly it worked.
However, this has given rise to another question. I am using SD_UpdateTexture() but I don't really understand the pitch parameter. My texture is using YUY2 so I would have thought that my pitch parameter should be width * colour depth which does not work. After playing around I found that the following works but don't understand why.
Can anybody shed any light on the pitch parameter? Kind Regards Amanda |
|||||||||||||||
|