Re: [FFmpeg-devel] Patch for IPC SHM

2019-07-25 Thread Moritz Barsnick
On Tue, Jul 23, 2019 at 19:23:12 +, aran.clau...@wwu.edu wrote: Some style nits for a first time contributer: > +if(c->shmid != -1) { ^ Please stick to the style "if (" (whitespace). > -id = shmget(IPC_PRIVATE, size, IPC_CREAT | 0777); > + > +id = shmget(IPC_PRIVATE, size,

Re: [FFmpeg-devel] Patch for IPC SHM

2019-07-25 Thread Paul B Mahol
On 7/23/19, aran.clau...@wwu.edu wrote: > From: Chad Fraleigh >> >> On 7/22/2019 11:14 AM, aran.clau...@wwu.edu wrote: >> >>> +static void rm_shmid(AVFormatContext *s) { >>> +XCBGrabContext *c = s->priv_data; >>> +if(c->shmid != -1) { >>> + shmctl(c->shmid, IPC_RMID, 0); >>> + c

Re: [FFmpeg-devel] Patch for IPC SHM

2019-07-23 Thread Aran.Clauson
From: Chad Fraleigh > > On 7/22/2019 11:14 AM, aran.clau...@wwu.edu wrote: > >> +static void rm_shmid(AVFormatContext *s) { >> +XCBGrabContext *c = s->priv_data; >> +if(c->shmid != -1) { >> + shmctl(c->shmid, IPC_RMID, 0); >> + c->shmid == -1; > ^^ > Assign

Re: [FFmpeg-devel] Patch for IPC SHM

2019-07-23 Thread Chad Fraleigh
On 7/22/2019 11:14 AM, aran.clau...@wwu.edu wrote: +static void rm_shmid(AVFormatContext *s) { +XCBGrabContext *c = s->priv_data; +if(c->shmid != -1) { + shmctl(c->shmid, IPC_RMID, 0); + c->shmid == -1; ^^ Assignment/compare operator mismatch. +}

Re: [FFmpeg-devel] Patch for IPC SHM

2019-07-22 Thread Aran.Clauson
From: Carl Eugen Hoyos Subject: Re: [FFmpeg-devel] Patch for IPC SHM Date: Mon, 22 Jul 2019 19:23:35 +0200 > > > >> Am 22.07.2019 um 18:10 schrieb : >> >> All, >> >> I have encountered an error in libavdevice/xcbgrab.c that prevents NetBSD >> f

Re: [FFmpeg-devel] Patch for IPC SHM

2019-07-22 Thread Carl Eugen Hoyos
> Am 22.07.2019 um 18:10 schrieb : > > 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

[FFmpeg-devel] Patch for IPC SHM

2019-07-22 Thread Aran.Clauson
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