OSDN Git Service

saintdev's 64-bit deadlock fix
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 18 Mar 2007 15:14:01 +0000 (15:14 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 18 Mar 2007 15:14:01 +0000 (15:14 +0000)
-should fix some issues when HB is used on a 64 bit system.
-thanks saintdev!

git-svn-id: svn://localhost/HandBrake/trunk@436 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.c
libhb/deca52.c
libhb/encfaac.c
libhb/enclame.c
libhb/internal.h

index 7b41a93..1d66e0b 100644 (file)
@@ -377,7 +377,7 @@ void hb_list_seebytes( hb_list_t * l, uint8_t * dst, int size )
  * in that buffer.
  *********************************************************************/
 void hb_list_getbytes( hb_list_t * l, uint8_t * dst, int size,
-                       uint64_t * pts, int * pos )
+                       uint64_t * pts, uint64_t * pos )
 {
     hb_buffer_t * buf;
     int           copied;
@@ -385,8 +385,8 @@ void hb_list_getbytes( hb_list_t * l, uint8_t * dst, int size,
     uint8_t       has_pts;
     
     /* So we won't have to deal with NULL pointers */
-    uint64_t dummy1;
-    int      dummy2;
+     uint64_t dummy1, dummy2;
+
     if( !pts ) pts = &dummy1;
     if( !pos ) pos = &dummy2;
 
index 1886b13..5294a5b 100644 (file)
@@ -143,8 +143,7 @@ static hb_buffer_t * Decode( hb_work_object_t * w )
     hb_work_private_t * pv = w->private_data;
     hb_buffer_t * buf;
     int           i, j, k;
-    uint64_t      pts;
-    int           pos;
+    uint64_t      pts, pos;
 
     /* Get a frame header if don't have one yet */
     if( !pv->sync )
index 83d390f..262bc4d 100644 (file)
@@ -132,8 +132,7 @@ static hb_buffer_t * Encode( hb_work_object_t * w )
 {
     hb_work_private_t * pv = w->private_data;
     hb_buffer_t * buf;
-    uint64_t      pts;
-    int           pos;
+    uint64_t      pts, pos;
 
     if( hb_list_bytes( pv->list ) < pv->input_samples * sizeof( float ) )
     {
index f663e62..c0b0f9d 100644 (file)
@@ -80,8 +80,8 @@ static hb_buffer_t * Encode( hb_work_object_t * w )
     hb_work_private_t * pv = w->private_data;
     hb_buffer_t * buf;
     int16_t samples_s16[1152 * 2];
-    uint64_t pts;
-    int      pos, i;
+    uint64_t pts, pos;
+       int      i;
 
     if( hb_list_bytes( pv->list ) < pv->input_samples * sizeof( float ) )
     {
index 3948d5d..79c9787 100644 (file)
@@ -12,7 +12,7 @@ void hb_log( char * log, ... );
 int  hb_list_bytes( hb_list_t * );
 void hb_list_seebytes( hb_list_t * l, uint8_t * dst, int size );
 void hb_list_getbytes( hb_list_t * l, uint8_t * dst, int size,
-                       uint64_t * pts, int * pos );
+                       uint64_t * pts, uint64_t * pos );
 void hb_list_empty( hb_list_t ** );
 
 hb_title_t * hb_title_init( char * dvd, int index );