summaryrefslogtreecommitdiffstats
path: root/libhb/hb.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-11-06 01:43:21 +0000
committerjstebbins <[email protected]>2011-11-06 01:43:21 +0000
commitd986524c71c2e41ce329e9dd5f6c78cb3d6e4de2 (patch)
treef1868de223c66ea0179537b498da3645ccd4efbb /libhb/hb.c
parent4ec40322ea7ac15f645a6a056da99b43d6d2ac12 (diff)
Fix probing mpeg video in program streams
... and probably some other formats as well. Libav's probe routine doesn't necessarily return names that match the codec names that can be looked up by avcodec_find_decoder_by_name(). So we have to manually map the names if the lookup fails. Lookup for mpeg video started failing with the last Libav bump because they removed an obsolete "mpegvideo" decoder that we were matching on. The correct decoder is "mpeg2video", but probe doesn't return that string. Also fix our implementation of the ff_lockmgr callback. Current git Libav fails if we don't fix it. So might as well fix it now. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4341 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb.c')
-rw-r--r--libhb/hb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index f5c93de4d..0e3e9e572 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -64,20 +64,17 @@ int hb_process_initialized = 0;
static void thread_func( void * );
hb_title_t * hb_get_title_by_index( hb_handle_t *, int );
-hb_lock_t *hb_avcodec_lock;
static int ff_lockmgr_cb(void **mutex, enum AVLockOp op)
{
switch ( op )
{
case AV_LOCK_CREATE:
{
- hb_avcodec_lock = hb_lock_init();
- *mutex = hb_avcodec_lock;
+ *mutex = hb_lock_init();
} break;
case AV_LOCK_DESTROY:
{
- hb_lock_close( &hb_avcodec_lock );
- *mutex = NULL;
+ hb_lock_close( (hb_lock_t**)mutex );
} break;
case AV_LOCK_OBTAIN:
{