From c6c3b33558aa505e6c44c988154ab253a895d1e3 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sat, 10 Apr 2010 01:10:15 +0000 Subject: fix some mingw warnings and a mingw build issue mingw gcc-4.5 has linker issues against shared libstdc++ git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3217 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/deccc608sub.c | 6 +++--- libhb/decmpeg2.c | 2 +- libhb/hb.c | 12 +++++++----- libhb/module.defs | 2 +- libhb/sync.c | 2 +- libhb/work.c | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libhb/deccc608sub.c b/libhb/deccc608sub.c index 2f1374943..de8a6462e 100644 --- a/libhb/deccc608sub.c +++ b/libhb/deccc608sub.c @@ -1500,7 +1500,7 @@ void write_cc_line_as_transcript (struct eia608_screen *data, struct s_write *wb buffer->start = wb->data608->current_visible_start_ms; buffer->stop = get_fts(wb); memcpy( buffer->data, wb->subline, length + 1 ); - //hb_log("CC %lld: %s", buffer->stop, wb->subline); + //hb_log("CC %"PRId64": %s", buffer->stop, wb->subline); if (wb->hb_last_buffer) { wb->hb_last_buffer->next = buffer; @@ -1684,7 +1684,7 @@ int write_cc_buffer_as_sami (struct eia608_screen *data, struct s_write *wb) LLONG endms = get_fts(wb)+subs_delay; endms--; // To prevent overlapping with next line. - sprintf ((char *) str,"

\r\n",startms); + sprintf ((char *) str,"

\r\n",startms); if (debug_608 && encoding!=ENC_UNICODE) { hb_log ("\r%s\n", str); @@ -1722,7 +1722,7 @@ int write_cc_buffer_as_sami (struct eia608_screen *data, struct s_write *wb) wb->enc_buffer_used=encode_line (wb->enc_buffer,(unsigned char *) str); fwrite (wb->enc_buffer,wb->enc_buffer_used,1,wb->fh); XMLRPC_APPEND(wb->enc_buffer,wb->enc_buffer_used); - sprintf ((char *) str,"

 

\r\n\r\n",endms); + sprintf ((char *) str,"

 

\r\n\r\n",endms); if (debug_608 && encoding!=ENC_UNICODE) { hb_log ("\r%s\n", str); diff --git a/libhb/decmpeg2.c b/libhb/decmpeg2.c index 7a4409678..63f2ebb40 100644 --- a/libhb/decmpeg2.c +++ b/libhb/decmpeg2.c @@ -506,7 +506,7 @@ static int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, m->flag = m->info->display_picture->flags; /* Uncomment this block to see frame-by-frame picture flags, as the video encodes. - hb_log("***** MPEG 2 Picture Info for PTS %lld *****", buf->start); + hb_log("***** MPEG 2 Picture Info for PTS %"PRId64" *****", buf->start); if( m->flag & TOP_FIRST ) hb_log("MPEG2 Flag: Top field first"); if( m->flag & PROGRESSIVE ) diff --git a/libhb/hb.c b/libhb/hb.c index 8e53a7a51..30fce039c 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -1,6 +1,10 @@ #include "hb.h" #include "hbffmpeg.h" +#if defined( SYS_MINGW ) && defined( PTW32_STATIC_LIB ) +#include +#endif + struct hb_handle_s { int id; @@ -145,10 +149,8 @@ hb_handle_t * hb_init( int verbose, int update_check ) { if (!hb_process_initialized) { -#ifdef USE_PTHREAD -#if defined( _WIN32 ) || defined( __MINGW32__ ) +#if defined( SYS_MINGW ) && defined( PTW32_STATIC_LIB ) pthread_win32_process_attach_np(); -#endif #endif hb_process_initialized =1; } @@ -680,13 +682,13 @@ int hb_detect_comb( hb_buffer_t * buf, int width, int height, int color_equal, i if( average_cc > threshold ) { #if 0 - hb_log("Average %i combed (Threshold %i) %i/%i/%i | PTS: %lld (%fs) %s", average_cc, threshold, cc[0], cc[1], cc[2], buf->start, (float)buf->start / 90000, (buf->flags & 16) ? "Film" : "Video" ); + hb_log("Average %i combed (Threshold %i) %i/%i/%i | PTS: %"PRId64" (%fs) %s", average_cc, threshold, cc[0], cc[1], cc[2], buf->start, (float)buf->start / 90000, (buf->flags & 16) ? "Film" : "Video" ); #endif return 1; } #if 0 - hb_log("SKIPPED Average %i combed (Threshold %i) %i/%i/%i | PTS: %lld (%fs) %s", average_cc, threshold, cc[0], cc[1], cc[2], buf->start, (float)buf->start / 90000, (buf->flags & 16) ? "Film" : "Video" ); + hb_log("SKIPPED Average %i combed (Threshold %i) %i/%i/%i | PTS: %"PRId64" (%fs) %s", average_cc, threshold, cc[0], cc[1], cc[2], buf->start, (float)buf->start / 90000, (buf->flags & 16) ? "Film" : "Video" ); #endif /* Reaching this point means no combing detected. */ diff --git a/libhb/module.defs b/libhb/module.defs index bb5aaec3e..e73102c9a 100644 --- a/libhb/module.defs +++ b/libhb/module.defs @@ -93,7 +93,7 @@ LIBHB.dll.libs = $(foreach n, \ ogg pthreadGC2 samplerate swscale theora vorbis vorbisenc x264 z, \ $(CONTRIB.build/)lib/lib$(n).a ) -LIBHB.GCC.args.extra.dylib++ = -Wl,--out-implib,$(LIBHB.lib) +LIBHB.GCC.args.extra.dylib++ += -Wl,--out-implib,$(LIBHB.lib) LIBHB.GCC.l += iberty ws2_32 LIBHB.out += $(LIBHB.dll) $(LIBHB.lib) diff --git a/libhb/sync.c b/libhb/sync.c index e4d7a30eb..f4be8c686 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -592,7 +592,7 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in, sub->stop = sub2->start; } - // hb_log("0x%x: video seq: %lld subtitle sequence: %lld", + // hb_log("0x%x: video seq: %"PRId64" subtitle sequence: %"PRId64, // sub, cur->sequence, sub->sequence); if( sub->sequence > cur->sequence ) diff --git a/libhb/work.c b/libhb/work.c index 4448278a2..eea492b9c 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -1146,7 +1146,7 @@ static void work_loop( void * _w ) if( buf_in && buf_out && buf_in->new_chap && buf_in->start == buf_out->start) { // restore log below to debug chapter mark propagation problems - //hb_log("work %s: Copying Chapter Break @ %lld", w->name, buf_in->start); + //hb_log("work %s: Copying Chapter Break @ %"PRId64, w->name, buf_in->start); buf_out->new_chap = buf_in->new_chap; } -- cgit v1.2.3