summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-05-30 17:08:12 +0000
committerjstebbins <[email protected]>2010-05-30 17:08:12 +0000
commite13377c88ac8e220993217b0725d9994344e40ae (patch)
tree12537540fec58e416d2d725685099b00f94def25 /libhb
parentf3d0c2e3986031403ccc52620833039da75920d6 (diff)
fix compiler warnings in several libhb files
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3335 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/deccc608sub.c24
-rw-r--r--libhb/deccc608sub.h4
-rw-r--r--libhb/dectx3gsub.c6
-rw-r--r--libhb/hb.c12
4 files changed, 23 insertions, 23 deletions
diff --git a/libhb/deccc608sub.c b/libhb/deccc608sub.c
index de8a6462e..b9033e6d6 100644
--- a/libhb/deccc608sub.c
+++ b/libhb/deccc608sub.c
@@ -18,7 +18,7 @@ static int cc_channel = 1;
static enum output_format write_format = OF_SRT;
static int sentence_cap = 0;
static int subs_delay = 0;
-static LLONG screens_to_process = -1;
+static int64_t screens_to_process = -1;
static int processed_enough = 0;
static int gui_mode_reports = 0;
static int norollup = 1;
@@ -27,7 +27,7 @@ static int direct_rollup = 0;
/*
* Get the time of the last buffer that we have received.
*/
-static LLONG get_fts(struct s_write *wb)
+static int64_t get_fts(struct s_write *wb)
{
return wb->last_pts;
}
@@ -1414,10 +1414,10 @@ void handle_text_attr (const unsigned char c1, const unsigned char c2, struct s_
}
}
-void mstotime (LLONG milli, unsigned *hours, unsigned *minutes,
+void mstotime (int64_t milli, unsigned *hours, unsigned *minutes,
unsigned *seconds, unsigned *ms)
{
- // LLONG milli = (LLONG) ((ccblock*1000)/29.97);
+ // int64_t milli = (int64_t) ((ccblock*1000)/29.97);
*ms=(unsigned) (milli%1000); // milliseconds
milli=(milli-*ms)/1000; // Remainder, in seconds
*seconds = (int) (milli%60);
@@ -1546,7 +1546,7 @@ void write_cc_buffer_to_gui (struct eia608_screen *data, struct s_write *wb)
unsigned h2,m2,s2,ms2;
int i;
- LLONG ms_start= wb->data608->current_visible_start_ms;
+ int64_t ms_start= wb->data608->current_visible_start_ms;
ms_start+=subs_delay;
if (ms_start<0) // Drop screens that because of subs_delay start too early
@@ -1559,7 +1559,7 @@ void write_cc_buffer_to_gui (struct eia608_screen *data, struct s_write *wb)
hb_log ("###SUBTITLE#");
if (!time_reported)
{
- LLONG ms_end = get_fts(wb)+subs_delay;
+ int64_t ms_end = get_fts(wb)+subs_delay;
mstotime (ms_start,&h1,&m1,&s1,&ms1);
mstotime (ms_end-1,&h2,&m2,&s2,&ms2); // -1 To prevent overlapping with next line.
// Note, only MM:SS here as we need to save space in the preview window
@@ -1585,14 +1585,14 @@ int write_cc_buffer_as_srt (struct eia608_screen *data, struct s_write *wb)
unsigned h1,m1,s1,ms1;
unsigned h2,m2,s2,ms2;
int wrote_something = 0;
- LLONG ms_start= wb->data608->current_visible_start_ms;
+ int64_t ms_start= wb->data608->current_visible_start_ms;
int i;
ms_start+=subs_delay;
if (ms_start<0) // Drop screens that because of subs_delay start too early
return 0;
- LLONG ms_end = get_fts(wb)+subs_delay;
+ int64_t ms_end = get_fts(wb)+subs_delay;
mstotime (ms_start,&h1,&m1,&s1,&ms1);
mstotime (ms_end-1,&h2,&m2,&s2,&ms2); // -1 To prevent overlapping with next line.
char timeline[128];
@@ -1675,16 +1675,16 @@ int write_cc_buffer_as_srt (struct eia608_screen *data, struct s_write *wb)
int write_cc_buffer_as_sami (struct eia608_screen *data, struct s_write *wb)
{
int wrote_something=0;
- LLONG startms = wb->data608->current_visible_start_ms;
+ int64_t startms = wb->data608->current_visible_start_ms;
int i;
startms+=subs_delay;
if (startms<0) // Drop screens that because of subs_delay start too early
return 0;
- LLONG endms = get_fts(wb)+subs_delay;
+ int64_t endms = get_fts(wb)+subs_delay;
endms--; // To prevent overlapping with next line.
- sprintf ((char *) str,"<SYNC start=\"%"PRIu64"\"><P class=\"UNKNOWNCC\">\r\n",startms);
+ sprintf ((char *) str,"<SYNC start=\"%"PRId64"\"><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=\"%"PRIu64"\"><P class=\"UNKNOWNCC\">&nbsp;</P></SYNC>\r\n\r\n",endms);
+ sprintf ((char *) str,"<SYNC start=\"%"PRId64"\"><P class=\"UNKNOWNCC\">&nbsp;</P></SYNC>\r\n\r\n",endms);
if (debug_608 && encoding!=ENC_UNICODE)
{
hb_log ("\r%s\n", str);
diff --git a/libhb/deccc608sub.h b/libhb/deccc608sub.h
index 1b7b9405a..c142c2aec 100644
--- a/libhb/deccc608sub.h
+++ b/libhb/deccc608sub.h
@@ -63,8 +63,6 @@ struct eia608_screen // A CC buffer
int empty; // Buffer completely empty?
};
-#define LLONG long long
-
struct eia608
{
struct eia608_screen buffer1;
@@ -73,7 +71,7 @@ struct eia608
int visible_buffer;
int srt_counter; // Number of subs currently written
int screenfuls_counter; // Number of meaningful screenfuls written
- LLONG current_visible_start_ms; // At what time did the current visible buffer became so?
+ int64_t current_visible_start_ms; // At what time did the current visible buffer became so?
// unsigned current_visible_start_cc; // At what time did the current visible buffer became so?
enum cc_modes mode;
unsigned char last_c1, last_c2;
diff --git a/libhb/dectx3gsub.c b/libhb/dectx3gsub.c
index fe413ad98..e9a178ec0 100644
--- a/libhb/dectx3gsub.c
+++ b/libhb/dectx3gsub.c
@@ -41,6 +41,7 @@ typedef struct {
#define READ_U16() (pos[0] << 8) | pos[1]; pos += 2;
#define READ_U32() (pos[0] << 24) | (pos[1] << 16) | (pos[2] << 8) | pos[3]; pos += 4;
#define READ_ARRAY(n) pos; pos += n;
+#define SKIP_ARRAY(n) pos += n;
#define WRITE_CHAR(c) {dst[0]=c; dst += 1;}
#define WRITE_START_TAG(c) {dst[0]='<'; dst[1]=c; dst[2]='>'; dst += 3;}
@@ -97,7 +98,7 @@ static hb_buffer_t *tx3g_decode_to_utf8( hb_buffer_t *in )
if ( numStyleRecords != 0 ) {
hb_log( "dectx3gsub: found additional StyleBoxes on subtitle; skipping" );
- READ_ARRAY(size);
+ SKIP_ARRAY(size);
continue;
}
@@ -118,7 +119,7 @@ static hb_buffer_t *tx3g_decode_to_utf8( hb_buffer_t *in )
}
} else {
// Found some other kind of TextSampleModifierBox. Skip it.
- READ_ARRAY(size);
+ SKIP_ARRAY(size);
}
}
@@ -174,6 +175,7 @@ static hb_buffer_t *tx3g_decode_to_utf8( hb_buffer_t *in )
#undef READ_U16
#undef READ_U32
#undef READ_ARRAY
+#undef SKIP_ARRAY
#undef WRITE_CHAR
#undef WRITE_START_TAG
diff --git a/libhb/hb.c b/libhb/hb.c
index 2a0fff133..075bb81f1 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -1511,37 +1511,37 @@ hb_filter_object_t * hb_get_filter_object(int filter_id, const char * settings)
{
if (filter_id == HB_FILTER_ROTATE)
{
- hb_filter_rotate.settings = settings;
+ hb_filter_rotate.settings = (char*)settings;
return &hb_filter_rotate;
}
if (filter_id == HB_FILTER_DETELECINE)
{
- hb_filter_detelecine.settings = settings;
+ hb_filter_detelecine.settings = (char*)settings;
return &hb_filter_detelecine;
}
if (filter_id == HB_FILTER_DECOMB)
{
- hb_filter_decomb.settings = settings;
+ hb_filter_decomb.settings = (char*)settings;
return &hb_filter_decomb;
}
if (filter_id == HB_FILTER_DEINTERLACE)
{
- hb_filter_deinterlace.settings = settings;
+ hb_filter_deinterlace.settings = (char*)settings;
return &hb_filter_deinterlace;
}
if (filter_id == HB_FILTER_DEBLOCK)
{
- hb_filter_deblock.settings = settings;
+ hb_filter_deblock.settings = (char*)settings;
return &hb_filter_deblock;
}
if (filter_id == HB_FILTER_DENOISE)
{
- hb_filter_denoise.settings = settings;
+ hb_filter_denoise.settings = (char*)settings;
return &hb_filter_denoise;
}
return NULL;