[FFmpeg-devel] [PATCH] Reset mutex to NULL after mutex destruction.

2014-09-29 Thread Manfred Georg
A badly behaving user provided mutex manager (such as that in OpenCV) may not reset the mutex to NULL on destruction. This can cause a problem for a later mutex manager (which may assert that the mutex is NULL before creating). --- libavcodec/utils.c | 15 +-- 1 file changed, 9 inse

Re: [FFmpeg-devel] [PATCH] Reset mutex to NULL after mutex destruction.

2014-09-30 Thread Manfred Georg
sider this patch dead. Manfred On Tue, Sep 30, 2014 at 12:13 PM, Michael Niedermayer wrote: > On Mon, Sep 29, 2014 at 09:57:02PM -0700, Manfred Georg wrote: > > Answers inline. > > > > On Mon, Sep 29, 2014 at 7:07 PM, Michael Niedermayer > > wrote: > > > >

Re: [FFmpeg-devel] [PATCH 2/2] av_lockmgr_register defines behavior on failure.

2014-09-30 Thread Manfred Georg
nvokes calls to this * callback and the previously registered callback during the -- 2.1.0.rc2.206.gedb03e5 Manfred On Tue, Sep 30, 2014 at 4:02 PM, Michael Niedermayer wrote: > On Tue, Sep 30, 2014 at 03:20:43PM -0700, Manfred Georg wrote: > > The register function now spe

Re: [FFmpeg-devel] [PATCH 2/2] av_lockmgr_register defines behavior on failure.

2014-09-30 Thread Manfred Georg
TROY); return -1; +} +lockmgr_cb = cb; +codec_mutex = new_codec_mutex; +avformat_mutex = new_avformat_mutex; } + return 0; } -- 2.1.0.rc2.206.gedb03e5 On Tue, Sep 30, 2014 at 4:02 PM, Michael Niedermayer wrote: > On Tue, Sep 30, 2014 at

Re: [FFmpeg-devel] [PATCH 2/2] av_lockmgr_register defines behavior on failure.

2014-10-01 Thread Manfred Georg
On Tue, Sep 30, 2014 at 8:16 PM, Michael Niedermayer wrote: > On Tue, Sep 30, 2014 at 07:34:28PM -0700, Manfred Georg wrote: > > Yeah, that seemed a bit odd to meI guess I get to go correct some > > calling code. > > > > Here is yet another update with a comment w

Re: [FFmpeg-devel] [PATCH 2/2] av_lockmgr_register defines behavior on failure.

2014-10-01 Thread Manfred Georg
As a further note. I'm pretty sure that none of the tests make use of av_lockmgr_register...so there's very little guarantee that this function is working correctly (particularly now that it has gotten so complicated). Manfred ___ ffmpeg-devel mailing l

Re: [FFmpeg-devel] [PATCH 2/2] av_lockmgr_register defines behavior on failure.

2014-10-01 Thread Manfred Georg
[snip] > @@ -3457,22 +3457,53 @@ AVHWAccel *av_hwaccel_next(const AVHWAccel > *hwaccel) > > int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) > > { > > if (lockmgr_cb) { > > -if (lockmgr_cb(&codec_mutex, AV_LOCK_DESTROY)) > > -return -1; > > -if

Re: [FFmpeg-devel] [PATCH 2/2] av_lockmgr_register defines behavior on failure.

2014-10-02 Thread Manfred Georg
On Wed, Oct 1, 2014 at 5:40 PM, Michael Niedermayer wrote: > On Wed, Oct 01, 2014 at 04:37:21PM -0700, Manfred Georg wrote: > > [snip] > > > > > @@ -3457,22 +3457,53 @@ AVHWAccel *av_hwaccel_next(const AVHWAccel > > > *hwaccel) > > > > int av_