OSDN Git Service

- fixed gcc warnings for various unused vars, implicit function decls, signedness.
authorkonablend <konablend@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 24 Jun 2009 03:18:52 +0000 (03:18 +0000)
committerkonablend <konablend@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 24 Jun 2009 03:18:52 +0000 (03:18 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@2612 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/decdca.c
libhb/dvd.c
libhb/dvdnav.c
libhb/internal.h
libhb/platform/macosx/encca_aac.c
libhb/stream.c
libhb/update.c
test/parsecsv.c

index ec625c5..4fe0661 100644 (file)
@@ -156,6 +156,7 @@ static hb_buffer_t * Decode( hb_work_object_t * w )
     hb_audio_t  * audio = w->audio;
     int           i, j, k;
     int64_t       pts, pos;
+    uint64_t      upts, upos;
     int           num_blocks;
 
     /* Get a frame header if don't have one yet */
@@ -198,7 +199,10 @@ static hb_buffer_t * Decode( hb_work_object_t * w )
     }
 
     /* Get the whole frame */
-    hb_list_getbytes( pv->list, pv->frame, pv->size, &pts, &pos );
+    hb_list_getbytes( pv->list, pv->frame, pv->size, &upts, &upos );
+    pts = (int64_t)upts;
+    pos = (int64_t)upos;
+
     if ( pts != pv->last_buf_pts )
     {
         pv->last_buf_pts = pts;
index d07ccc6..2d5fb8c 100644 (file)
@@ -9,6 +9,7 @@
 #include "dvd.h"
 
 #include "dvdread/ifo_read.h"
+#include "dvdread/ifo_print.h"
 #include "dvdread/nav_read.h"
 
 static hb_dvd_t    * hb_dvdread_init( char * path );
index 063498c..dfe847d 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "dvdnav/dvdnav.h"
 #include "dvdread/ifo_read.h"
+#include "dvdread/ifo_print.h"
 #include "dvdread/nav_read.h"
 
 #define DVD_READ_CACHE 1
index a00142b..c68d9fa 100644 (file)
@@ -189,6 +189,9 @@ void                 hb_stream_close( hb_stream_t ** );
 hb_title_t * hb_stream_title_scan( hb_stream_t *);
 int          hb_stream_read( hb_stream_t *, hb_buffer_t *);
 int          hb_stream_seek( hb_stream_t *, float );
+int          hb_stream_seek_chapter( hb_stream_t *, int );
+int          hb_stream_chapter( hb_stream_t * );
+
 
 void       * hb_ffmpeg_context( int codec_param );
 void       * hb_ffmpeg_avstream( int codec_param );
index 69b29ec..26aff20 100644 (file)
@@ -57,7 +57,7 @@ static int readDescr(UInt8 **buffer, int *tag)
 }
 
 // based off of mov_read_esds from mov.c in ffmpeg's libavformat
-static long ReadESDSDescExt(void* descExt, UInt8 **buffer, int *size, int versionFlags)
+static long ReadESDSDescExt(void* descExt, UInt8 **buffer, UInt32 *size, int versionFlags)
 {
        UInt8 *esds = (UInt8 *) descExt;
        int tag, len;
@@ -154,7 +154,7 @@ int encCoreAudioInit( hb_work_object_t * w, hb_job_t * job )
 
     // get available bitrates
     AudioValueRange *bitrates;
-    ssize_t bitrateCounts, n;
+    ssize_t bitrateCounts;
     err = AudioConverterGetPropertyInfo( pv->converter, kAudioConverterApplicableEncodeBitRates,
                                          &tmpsiz, NULL);
     bitrates = malloc( tmpsiz );
@@ -200,7 +200,7 @@ int encCoreAudioInit( hb_work_object_t * w, hb_job_t * job )
                                &tmp, w->config->aac.bytes );
     // CoreAudio returns a complete ESDS, but we only need
     // the DecoderSpecific info.
-    UInt8* buffer;
+    UInt8* buffer = NULL;
     ReadESDSDescExt(w->config->aac.bytes, &buffer, &tmpsiz, 0);
     w->config->aac.length = tmpsiz;
     memmove( w->config->aac.bytes, buffer,
index 92907e1..37682b1 100644 (file)
@@ -1217,7 +1217,7 @@ int hb_stream_seek_chapter( hb_stream_t * stream, int chapter_num )
     }
 
     int64_t sum_dur = 0;
-    hb_chapter_t *chapter;
+    hb_chapter_t *chapter = NULL;
     int i;
     for ( i = 0; i < chapter_num; ++i)
     {
index 89909d3..9f72523 100644 (file)
@@ -31,7 +31,6 @@ static void UpdateFunc( void * _data )
 
     hb_update_t * data = (hb_update_t *) _data;
 
-    char*       p;
     char* const url  = HB_PROJECT_URL_APPCAST;
     char* const urlz = url + strlen( HB_PROJECT_URL_APPCAST ); /* marks null-term */
     char        url_host[64];
index cc3b6aa..f0c2a1a 100644 (file)
@@ -139,7 +139,7 @@ void hb_dispose_cell( hb_csv_cell_t *cell )
 static uint16_t hb_parse_character( hb_csv_file_t * file )
 {
     int byte;
-    uint16_t c;
+    uint16_t c = 0;
     int need_char = 1;
 
     if( file == NULL )