Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-23 Thread Jorge Ramirez
On 10/23/2017 01:47 AM, Mark Thompson wrote: so let's make this work then and fix the SIGSEGV present in master asap (btw this RFC also seg-fault when the above is applied) Where does that version segfault? (It doesn't for me.) the patch will segfault if the changes below are applied to the

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-22 Thread Mark Thompson
On 19/10/17 18:55, Jorge Ramirez wrote: > On 10/19/2017 11:49 AM, Mark Thompson wrote: >> On 19/10/17 08:28, Jorge Ramirez wrote: >>> On 10/19/2017 02:10 AM, Mark Thompson wrote: Refcount all of the context information. --- As discussed in the other thread, something like this.  We m

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-20 Thread Jorge Ramirez
On 10/19/2017 07:55 PM, Jorge Ramirez wrote: ok so I guess there is no point to discuss further what I tried to put forward (I could provide my implementation to compare against this RFC - it is just a handful of lines of code - but I guess there is no point given that everyone is comfortable

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-19 Thread Jorge Ramirez
On 10/19/2017 07:55 PM, Jorge Ramirez wrote: On 10/19/2017 11:49 AM, Mark Thompson wrote: On 19/10/17 08:28, Jorge Ramirez wrote: On 10/19/2017 02:10 AM, Mark Thompson wrote: Refcount all of the context information. --- As discussed in the other thread, something like this. We move most of t

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-19 Thread Jorge Ramirez
On 10/19/2017 11:49 AM, Mark Thompson wrote: On 19/10/17 08:28, Jorge Ramirez wrote: On 10/19/2017 02:10 AM, Mark Thompson wrote: Refcount all of the context information. --- As discussed in the other thread, something like this. We move most of the context into a refcounted buffer and AVCode

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-19 Thread Mark Thompson
On 19/10/17 08:28, Jorge Ramirez wrote: > On 10/19/2017 02:10 AM, Mark Thompson wrote: >> Refcount all of the context information. >> --- >> As discussed in the other thread, something like this.  We move most of the >> context into a refcounted buffer and AVCodecContext.priv_data is left as a >>

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-19 Thread Hendrik Leppkes
On Thu, Oct 19, 2017 at 9:28 AM, Jorge Ramirez wrote: > On 10/19/2017 02:10 AM, Mark Thompson wrote: >> >> Refcount all of the context information. >> --- >> As discussed in the other thread, something like this. We move most of >> the context into a refcounted buffer and AVCodecContext.priv_data

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-19 Thread Jorge Ramirez
On 10/19/2017 02:10 AM, Mark Thompson wrote: Refcount all of the context information. --- As discussed in the other thread, something like this. We move most of the context into a refcounted buffer and AVCodecContext.priv_data is left as a stub holding a reference to it. Thoughts: * Change is

Re: [FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-19 Thread Jorge Ramirez
On 10/19/2017 02:10 AM, Mark Thompson wrote: Refcount all of the context information. --- As discussed in the other thread, something like this. We move most of the context into a refcounted buffer and AVCodecContext.priv_data is left as a stub holding a reference to it. um, ok ... please co

[FFmpeg-devel] [RFC] v4l2_m2m: Fix races around freeing data on close

2017-10-18 Thread Mark Thompson
Refcount all of the context information. --- As discussed in the other thread, something like this. We move most of the context into a refcounted buffer and AVCodecContext.priv_data is left as a stub holding a reference to it. Thoughts: * Change is rather ugly; some structures and function argu