From f175365c7f4b83267eb582b5c8c23794f2c62945 Mon Sep 17 00:00:00 2001 From: titer Date: Wed, 29 Mar 2006 16:22:23 +0000 Subject: [PATCH] gcc 2.95 fixes git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/avformat@57 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/encfaac.c | 8 ++++---- libhb/encx264.c | 2 +- libhb/hb.c | 2 +- libhb/muxmp4.c | 8 ++++---- libhb/work.c | 3 ++- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/libhb/encfaac.c b/libhb/encfaac.c index 4c0d19e72..8e2bd4355 100644 --- a/libhb/encfaac.c +++ b/libhb/encfaac.c @@ -42,9 +42,11 @@ hb_work_object_t hb_encfaac = int encfaacInit( hb_work_object_t * w, hb_job_t * job ) { hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) ); - w->private_data = pv; - faacEncConfigurationPtr cfg; + uint8_t * bytes; + unsigned long length; + + w->private_data = pv; pv->job = job; @@ -67,8 +69,6 @@ int encfaacInit( hb_work_object_t * w, hb_job_t * job ) hb_log( "faacEncSetConfiguration failed" ); } - uint8_t * bytes; - unsigned long length; if( faacEncGetDecoderSpecificInfo( pv->faac, &bytes, &length ) < 0 ) { hb_log( "faacEncGetDecoderSpecificInfo failed" ); diff --git a/libhb/encx264.c b/libhb/encx264.c index cfb8d01aa..e0a2c5fc6 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -43,6 +43,7 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) x264_param_t param; x264_nal_t * nal; int nal_count; + int i, size; hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) ); w->private_data = pv; @@ -98,7 +99,6 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) hb_log( "encx264: opening libx264 (pass %d)", job->pass ); pv->x264 = x264_encoder_open( ¶m ); - int i, size; w->config->mpeg4.length = 0; x264_encoder_headers( pv->x264, &nal, &nal_count ); diff --git a/libhb/hb.c b/libhb/hb.c index 90ab5599c..d44c05de6 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -260,6 +260,7 @@ void hb_set_size( hb_job_t * job, int aspect, int pixels ) int croppedAspect = title->aspect * title->height * croppedWidth / croppedHeight / title->width; int addCrop; + int i, w, h; if( aspect <= 0 ) { @@ -319,7 +320,6 @@ void hb_set_size( hb_job_t * job, int aspect, int pixels ) } /* Compute a resolution from the number of pixels and aspect */ - int i, w, h; for( i = 0;; i++ ) { w = 16 * i; diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index fb9011f24..21aea7a53 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -40,11 +40,14 @@ static int MP4Init( hb_mux_object_t * m ) hb_audio_t * audio; int i; + AVFormatContext * oc; + AVStream *st; + AVFormatParameters params; register_protocol(&file_protocol); movenc_init(); - AVFormatContext * oc = av_alloc_format_context(); + oc = av_alloc_format_context(); if( job->mux & HB_MUX_PSP ) { @@ -62,8 +65,6 @@ static int MP4Init( hb_mux_object_t * m ) snprintf( oc->filename, sizeof( oc->filename ), "%s", job->file ); - AVStream *st; - st = av_new_stream( oc, oc->nb_streams ); if( !st ) { @@ -123,7 +124,6 @@ static int MP4Init( hb_mux_object_t * m ) return 1; } - AVFormatParameters params; memset( ¶ms, 0, sizeof( params ) ); if( av_set_parameters( oc, ¶ms ) < 0 ) { diff --git a/libhb/work.c b/libhb/work.c index 2ad4f65f7..349a630e3 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -71,6 +71,7 @@ static void do_job( hb_job_t * job, int cpu_count ) hb_work_object_t * w; hb_audio_t * audio; hb_subtitle_t * subtitle; + int done; title = job->title; @@ -229,7 +230,7 @@ static void do_job( hb_job_t * job, int cpu_count ) HB_LOW_PRIORITY ); } - int done = 0; + done = 0; w = hb_list_item( job->list_work, 0 ); w->init( w, job ); while( !*job->die ) -- 2.40.0