]> granicus.if.org Git - handbrake/commitdiff
fix some mingw warnings and a mingw build issue
authorjstebbins <jstebbins.hb@gmail.com>
Sat, 10 Apr 2010 01:10:15 +0000 (01:10 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sat, 10 Apr 2010 01:10:15 +0000 (01:10 +0000)
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
libhb/decmpeg2.c
libhb/hb.c
libhb/module.defs
libhb/sync.c
libhb/work.c

index 2f137494305fc8dad4fe929f2d556a86c13a2790..de8a6462e65225c83efe7b10b5043354e718e63b 100644 (file)
@@ -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,"<SYNC start=\"%llu\"><P class=\"UNKNOWNCC\">\r\n",startms);
+    sprintf ((char *) str,"<SYNC start=\"%"PRIu64"\"><P class=\"UNKNOWNCC\">\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,"<SYNC start=\"%llu\"><P class=\"UNKNOWNCC\">&nbsp;</P></SYNC>\r\n\r\n",endms);
+    sprintf ((char *) str,"<SYNC start=\"%"PRIu64"\"><P class=\"UNKNOWNCC\">&nbsp;</P></SYNC>\r\n\r\n",endms);
     if (debug_608 && encoding!=ENC_UNICODE)
     {
         hb_log ("\r%s\n", str);
index 7a4409678fb2694aa5f9f582cd444e93e9b58276..63f2ebb403a18cea878c751f1aa290f85b144a82 100644 (file)
@@ -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 )
index 8e53a7a51c81c2fb1c64447b430dc18d19ba2f5f..30fce039cc0bbafde351131fe9e683a30ad8824b 100644 (file)
@@ -1,6 +1,10 @@
 #include "hb.h"
 #include "hbffmpeg.h"
 
+#if defined( SYS_MINGW ) && defined( PTW32_STATIC_LIB )
+#include <pthread.h>
+#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. */
index bb5aaec3e4e5884720e63ed1cd79e9b5e066b1c8..e73102c9aa687cc65116b13d063be1605ad9810d 100644 (file)
@@ -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)
 
index e4d7a30eb55fc1517612cc9f57183027c890cfc0..f4be8c68644e3cfdcfe9d647244da1f84b2ca9e0 100644 (file)
@@ -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 )
index 4448278a21aa2d82d0abae23e52f9746322a9321..eea492b9c5a88060a443761c889af22d3faa2ccd 100644 (file)
@@ -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;
         }