OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / libhb / deccc608sub.c
index 87899b4..de8a646 100644 (file)
@@ -16,7 +16,7 @@ static int nofontcolor = 0;
 static enum encoding_type encoding = ENC_UTF_8;
 static int cc_channel = 1;
 static enum output_format write_format = OF_SRT;
-static int sentence_cap = 1;
+static int sentence_cap = 0;
 static int subs_delay = 0;
 static LLONG screens_to_process = -1;
 static int processed_enough = 0;
@@ -681,7 +681,7 @@ int get_char_in_utf_8 (unsigned char *buffer, unsigned char c) // Returns number
             *buffer=0x27;                      
             return 1;
         case 0x97: // inverted exclamation mark
-            *buffer=0xc1;
+            *buffer=0xc2;
             *(buffer+1)=0xa1;
             return 2;
         case 0x98: // asterisk
@@ -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;
@@ -1637,7 +1637,8 @@ int write_cc_buffer_as_srt (struct eia608_screen *data, struct s_write *wb)
             } else {
                 if (line == 2) {
                     wb->enc_buffer_used += encode_line (wb->enc_buffer+wb->enc_buffer_used,
-                                                        (unsigned char *) " ");
+                                                        (unsigned char *) "\n");
+                    line = 3;
                 } else {
                     wb->enc_buffer_used += encode_line (wb->enc_buffer+wb->enc_buffer_used,
                                                         (unsigned char *) " "); 
@@ -1683,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);
@@ -1721,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);