[FFmpeg-devel] Patch for IPC SHM

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Jul 22 20:23:35 EEST 2019




> Am 22.07.2019 um 18:10 schrieb <Aran.Clauson at wwu.edu> <Aran.Clauson at wwu.edu>:
> 
> All,
> 
> I have encountered an error in libavdevice/xcbgrab.c that prevents NetBSD from
> using X11grab.  When xcbgrab_frame_shm calls allocate_shm, it creates a private
> shared memory region, attaches to that memory, sends the id to the server, but
> then removes the shared memory ID.  On NetBSD with xorg, this causes the
> subsequent call to xcb_shm_get_image to fail with BadShmSeg.  The fix is to keep
> the ID valid until the memory is know to be shared, after the call to
> xcb_shm_get_image_reply.  The following patch fixes the issue on my system.  It
> is untested on others.
> 
> My guess is that Linux keeps the ID around until all attached processes
> terminate.

Please create your patch with “git format-patch”, we cannot read other patches.

Thank you, Carl Eugen


More information about the ffmpeg-devel mailing list