diff options
author | jstebbins <[email protected]> | 2008-12-12 18:54:36 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-12-12 18:54:36 +0000 |
commit | 47b9304671876792e9a2364e867c9601d0432076 (patch) | |
tree | 7db84f17a253b6767552495b92ed6341000af62c /libhb/decomb.c | |
parent | cec83b5d831f2c988e5544ddc16602bda903a225 (diff) |
fix a threading issue with avcodec_open/close
these functions can not be called from 2 threads simultaneosly.
made a wrapper function that holds a lock while making the call
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2023 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decomb.c')
-rw-r--r-- | libhb/decomb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libhb/decomb.c b/libhb/decomb.c index 2194f5633..4fb573045 100644 --- a/libhb/decomb.c +++ b/libhb/decomb.c @@ -1309,7 +1309,7 @@ hb_filter_private_t * hb_decomb_init( int pix_fmt, avctx_enc->flags |= CODEC_FLAG_QPEL; } - avcodec_open(avctx_enc, enc); + hb_avcodec_open(avctx_enc, enc); } pv->mcdeint_frame = avcodec_alloc_frame(); @@ -1413,7 +1413,7 @@ void hb_decomb_close( hb_filter_private_t * pv ) { if( pv->mcdeint_avctx_enc ) { - avcodec_close( pv->mcdeint_avctx_enc ); + hb_avcodec_close( pv->mcdeint_avctx_enc ); av_freep( &pv->mcdeint_avctx_enc ); } if( pv->mcdeint_outbuf ) |