diff --git a/src/608_sami.c b/src/608_sami.c index 1ffdb6ab..921f793d 100644 --- a/src/608_sami.c +++ b/src/608_sami.c @@ -2,7 +2,9 @@ void write_stringz_as_sami(char *string, struct s_context_cc608 *context, LLONG ms_start, LLONG ms_end) { - sprintf ((char *) str,"

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

\r\n", + (unsigned long long)ms_start); if (ccx_options.encoding!=CCX_ENC_UNICODE) { dbg_print(CCX_DMT_608, "\r%s\n", str); @@ -56,7 +58,9 @@ void write_stringz_as_sami(char *string, struct s_context_cc608 *context, LLONG } enc_buffer_used=encode_line (enc_buffer,(unsigned char *) str); write(context->out->fh, enc_buffer, enc_buffer_used); - sprintf ((char *) str,"

 

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

 

\r\n\r\n", + (unsigned long long)ms_end); if (ccx_options.encoding!=CCX_ENC_UNICODE) { dbg_print(CCX_DMT_608, "\r%s\n", str); @@ -79,7 +83,9 @@ int write_cc_buffer_as_sami(struct eia608_screen *data, struct s_context_cc608 * endms = get_visible_end()+subs_delay; endms--; // To prevent overlapping with next line. - sprintf ((char *) str,"

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

\r\n", + (unsigned long long)startms); if (ccx_options.encoding!=CCX_ENC_UNICODE) { dbg_print(CCX_DMT_608, "\r%s\n", str); @@ -110,7 +116,9 @@ int write_cc_buffer_as_sami(struct eia608_screen *data, struct s_context_cc608 * } enc_buffer_used=encode_line (enc_buffer,(unsigned char *) str); write(context->out->fh, enc_buffer, enc_buffer_used); - sprintf ((char *) str,"

 

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

 

\r\n\r\n", + (unsigned long long)endms); if (ccx_options.encoding!=CCX_ENC_UNICODE) { dbg_print(CCX_DMT_608, "\r%s\n", str); diff --git a/src/708.c b/src/708.c index 2060cd7d..70be9fe5 100644 --- a/src/708.c +++ b/src/708.c @@ -143,7 +143,7 @@ void clearTV (cc708_service_decoder *decoder, int buffer) // Buffer => 1 or 2 void printTVtoSRT (cc708_service_decoder *decoder, int which) { - tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2; + /* tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2; */ unsigned h1,m1,s1,ms1; unsigned h2,m2,s2,ms2; LLONG ms_start= decoder->current_visible_start_ms; @@ -209,7 +209,7 @@ void printTVtoSRT (cc708_service_decoder *decoder, int which) void printTVtoConsole (cc708_service_decoder *decoder, int which) { - tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2; + /* tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2; */ char tbuf1[15],tbuf2[15]; print_mstime2buf (decoder->current_visible_start_ms,tbuf1); print_mstime2buf (get_visible_end(),tbuf2); diff --git a/src/asf_functions.c b/src/asf_functions.c index 0d8603ed..6c73c5b9 100644 --- a/src/asf_functions.c +++ b/src/asf_functions.c @@ -796,8 +796,8 @@ LLONG asf_getmoredata(void) int MediaObjectSize = 0; int PresentationTimems = 0; //Payload ms time stamp int extsize = 0; - int32_t dwVersion = 0; - int32_t unknown = 0; + // int32_t dwVersion = 0; + // int32_t unknown = 0; int64_t rtStart = 0; // dvr-ms 100ns time stamp start int64_t rtEnd = 0; // dvr-ms 100ns time stamp end @@ -827,8 +827,8 @@ LLONG asf_getmoredata(void) } if ( PayloadExtPTSEntry[PayloadStreamNumber] > 0 ) { - dwVersion = *((uint32_t*)(reppos+0)); - unknown = *((uint32_t*)(reppos+4)); + // dwVersion = *((uint32_t*)(reppos+0)); + // unknown = *((uint32_t*)(reppos+4)); rtStart = *((int64_t*)(reppos+8)); rtEnd = *((int64_t*)(reppos+16)); diff --git a/src/avc_functions.c b/src/avc_functions.c index adb5dc2e..f937174c 100644 --- a/src/avc_functions.c +++ b/src/avc_functions.c @@ -38,7 +38,6 @@ long num_unexpected_sei_length=0; double roundportable(double x) { return floor(x + 0.5); } int ebsp_to_rbsp(char* rbsp, char* ebsp, int length); -static char s_rbsp[1024*1024]; void init_avc(void) { @@ -821,6 +820,7 @@ void slice_header (unsigned char *heabuf, unsigned char *heaend, int nal_unit_ty { fatal(EXIT_BUG_BUG, "AVC: pic_order_cnt_type == 1 not yet supported."); } + #if 0 else { /* CFS: Warning!!: Untested stuff, copied from specs (8.2.1.3) */ @@ -857,6 +857,7 @@ void slice_header (unsigned char *heabuf, unsigned char *heaend, int nal_unit_ty //TODO // Calculate picture order count (POC) according to 8.2.1 } + #endif // The rest of the data in slice_header() is currently unused. // A reference pic (I or P is always the last displayed picture of a POC diff --git a/src/bitstream.h b/src/bitstream.h index 843f56ba..a28b276c 100644 --- a/src/bitstream.h +++ b/src/bitstream.h @@ -36,6 +36,8 @@ struct bitstream #define read_i32(bstream) (int32_t)bitstream_get_num(bstream,4,1) #define read_i64(bstream) (int64_t)bitstream_get_num(bstream,8,1) +#define skip_u32(bstream) (void)bitstream_get_num(bstream,4,1) + #define next_u8(bstream) (uint8_t)bitstream_get_num(bstream,1,0) #define next_u16(bstream) (uint16_t)bitstream_get_num(bstream,2,0) #define next_u32(bstream) (uint32_t)bitstream_get_num(bstream,4,0) diff --git a/src/es_functions.c b/src/es_functions.c index 7f63a1cd..c5fc89be 100644 --- a/src/es_functions.c +++ b/src/es_functions.c @@ -253,7 +253,7 @@ static int es_video_sequence(struct bitstream *esstream) // Sequence_end_code if (startcode == 0xB7) { - read_u32(esstream); // Advance bitstream + skip_u32(esstream); // Advance bitstream no_bitstream_error = 0; break; } @@ -488,7 +488,7 @@ static int sequence_ext(struct bitstream *esstream) return 0; } - read_u32(esstream); // Advance + skip_u32(esstream); // Advance // Read extension_start_code_identifier unsigned extension_id = (unsigned) read_bits(esstream, 4); @@ -905,7 +905,7 @@ static int pic_coding_ext(struct bitstream *esstream) return 0; } - read_u32(esstream); // Advance + skip_u32(esstream); // Advance // Read extension_start_code_identifier unsigned extension_id = (unsigned int) read_bits(esstream, 4); @@ -996,7 +996,7 @@ static int extension_and_user_data(struct bitstream *esstream, int udtype) if ( startcode == 0xB2 || startcode == 0xB5 ) { - read_u32(esstream); // Advance bitstream + skip_u32(esstream); // Advance bitstream unsigned char *dstart = esstream->pos; // Advanve esstream to the next startcode. Verify that @@ -1114,7 +1114,7 @@ static int read_pic_data(struct bitstream *esstream) if ( startcode >= 0x01 && startcode <= 0xAF ) { - read_u32(esstream); // Advance bitstream + skip_u32(esstream); // Advance bitstream search_start_code(esstream); // Skip this slice } } diff --git a/src/es_userdata.c b/src/es_userdata.c index 1b3780ef..ac0348f6 100644 --- a/src/es_userdata.c +++ b/src/es_userdata.c @@ -153,7 +153,7 @@ int user_data(struct bitstream *ustream, int udtype) unsigned field_number; unsigned cc_data1; unsigned cc_data2; - unsigned marker; + /* unsigned marker; */ for (unsigned j=0;jbitsleft < 0) fatal(EXIT_BUG_BUG, "Oops!"); diff --git a/src/general_loop.c b/src/general_loop.c index cf45088d..ffda75ac 100644 --- a/src/general_loop.c +++ b/src/general_loop.c @@ -38,8 +38,6 @@ enum ccx_frame_type current_picture_coding_type = CCX_FRAME_TYPE_RESET_OR_UNKNOW // and the expected unrecognized first header for TiVo files. int strangeheader=0; -static int non_compliant_DVD = 0; // Found extra captions in DVDs? - unsigned char *filebuffer; LLONG filebuffer_start; // Position of buffer start relative to file int filebuffer_pos; // Position of pointer relative to buffer start @@ -273,7 +271,7 @@ void processhex (char *filename) { size_t max=(size_t) inputsize+1; // Enough for the whole thing. Hex dumps are small so we can be lazy here char *line=(char *) malloc (max); - const char *mpeg_header="00 00 01 b2 43 43 01 f8 "; // Always present + /* const char *mpeg_header="00 00 01 b2 43 43 01 f8 "; // Always present */ FILE *fr = fopen (filename, "rt"); unsigned char *bytes=NULL; unsigned byte_count=0; @@ -281,7 +279,7 @@ void processhex (char *filename) while(fgets(line, max-1, fr) != NULL) { char *c1, *c2=NULL; // Positions for first and second colons - int len; + /* int len; */ long timing; if (line[0]==';') // Skip comments continue; @@ -291,7 +289,7 @@ void processhex (char *filename) continue; *c1=0; *c2=0; - len=atoi (line); + /* len=atoi (line); */ timing=atol (c1+2)*(MPEG_CLOCK_FREQ/1000); current_pts=timing; if (pts_set==0) @@ -382,10 +380,10 @@ void processhex (char *filename) else { unsigned char magic=bytes[0]; - unsigned extra_field_flag=magic&1; + /* unsigned extra_field_flag=magic&1; */ unsigned caption_count=((magic>>1)&0x1F); unsigned filler=((magic>>6)&1); - unsigned pattern=((magic>>7)&1); + /* unsigned pattern=((magic>>7)&1); */ int always_ff=1; int current_field=0; if (filler==0 && caption_count*6==byte_count-1) // Note that we are ignoring the extra field for now... diff --git a/src/gpacmp4/mp4.c b/src/gpacmp4/mp4.c index 1e412e70..f5a1debb 100644 --- a/src/gpacmp4/mp4.c +++ b/src/gpacmp4/mp4.c @@ -24,11 +24,6 @@ static struct { unsigned type[32]; }s_nalu_stats; -static struct { - unsigned total; - unsigned type[256]; -}s_sei_stats; - static int process_avc_sample(u32 timescale, GF_AVCConfig* c, GF_ISOSample* s) { int status = 0; @@ -73,7 +68,7 @@ static int process_avc_sample(u32 timescale, GF_AVCConfig* c, GF_ISOSample* s) } static int process_xdvb_track(const char* basename, GF_ISOFile* f, u32 track) { - u32 timescale, i, sample_count, last_sdi = 0; + u32 timescale, i, sample_count; int status; if((sample_count = gf_isom_get_sample_count(f, track)) < 1){ @@ -262,7 +257,7 @@ int processmp4 (char *file) if (avc_track_count && ccx_options.mp4vidtrack) continue; - unsigned num_streams = gf_isom_get_sample_description_count (f,i+1); + /* unsigned num_streams = gf_isom_get_sample_description_count (f,i+1); */ unsigned num_samples = gf_isom_get_sample_count (f,i+1); u32 ProcessingStreamDescriptionIndex = 0; // Current track we are processing, 0 = we don't know yet @@ -287,7 +282,7 @@ int processmp4 (char *file) if (sample==NULL) continue; // mprint ("Data length: %lu\n",sample->dataLength); - const LLONG timestamp = (LLONG )((sample->DTS + sample->CTS_Offset) * 1000) / timescale; + /* const LLONG timestamp = (LLONG )((sample->DTS + sample->CTS_Offset) * 1000) / timescale; */ current_pts=(LLONG )(sample->DTS + sample->CTS_Offset)*MPEG_CLOCK_FREQ/timescale ; // Convert frequency to official one if (pts_set==0) pts_set=1; diff --git a/src/gpacmp4/stbl_write.c b/src/gpacmp4/stbl_write.c index bb8ffc29..065045da 100644 --- a/src/gpacmp4/stbl_write.c +++ b/src/gpacmp4/stbl_write.c @@ -1419,7 +1419,7 @@ void stbl_AppendPadding(GF_SampleTableBox *stbl, u8 padding) pad_bits = (u8*)gf_malloc(sizeof(u8) * stbl->SampleSize->sampleCount); if (!pad_bits) return; - memset(pad_bits, 0, sizeof(pad_bits)); + memset(pad_bits, 0, sizeof(u8) * stbl->SampleSize->sampleCount); // for (i=0; iSampleSize->sampleCount; i++) pad_bits[i] = 0; for (i=0; iPaddingBits->SampleCount; i++) pad_bits[i] = stbl->PaddingBits->padbits[i]; pad_bits[stbl->SampleSize->sampleCount-1] = padding; diff --git a/src/myth.c b/src/myth.c index 294bf608..adfb6d1c 100644 --- a/src/myth.c +++ b/src/myth.c @@ -286,9 +286,11 @@ static AVPacket av; int get_be16() { unsigned char a,b; - buffered_read_byte (&a); + unsigned char *a_p = &a; // Just to suppress warnings + unsigned char *b_p = &b; + buffered_read_byte (a_p); past++; - buffered_read_byte (&b); + buffered_read_byte (b_p); past++; return (a<<8) | b; } @@ -296,7 +298,8 @@ int get_be16() int get_byte () { unsigned char b; - buffered_read_byte(&b); + unsigned char *b_p = &b; + buffered_read_byte(b_p); if (result==1) { past++; @@ -341,8 +344,9 @@ static int find_next_start_code(int *size_ptr, while (n > 0) { unsigned char cx; - buffered_read_byte (&cx); - if (result!=1) + unsigned char *cx_p = &cx; + buffered_read_byte (cx_p); + if (result!=1) break; past++; v = cx; @@ -401,9 +405,8 @@ static int mpegps_read_pes_header(int *pstart_code, LLONG *ppts, LLONG *pdts) { int len, size, startcode, c, flags, header_len; - LLONG pts, dts, last_pos; + LLONG pts, dts; - last_pos = -1; redo: /* next start code (should be immediately after) */ header_state = 0xff; diff --git a/src/spupng_encoder.c b/src/spupng_encoder.c index 6eeb95b0..ed8fb4bc 100644 --- a/src/spupng_encoder.c +++ b/src/spupng_encoder.c @@ -206,7 +206,6 @@ slant: * @param ch Character height in pixels. * * Draw blank character. - */ static void draw_blank(int canvas_type, uint8_t *canvas, unsigned int rowstride, unsigned int color, int cw, int ch) @@ -220,6 +219,7 @@ draw_blank(int canvas_type, uint8_t *canvas, unsigned int rowstride, canvas += rowstride; } } +*/ /** * @internal diff --git a/src/stream_functions.c b/src/stream_functions.c index 7ded520c..38a80b3d 100644 --- a/src/stream_functions.c +++ b/src/stream_functions.c @@ -159,8 +159,8 @@ int detect_myth( void ) memcpy (uc,startbytes,3); for (int i=3;i>3; // 5 MSB - unsigned magazine_number=data[i+5]&0x7; // 3 LSB + // unsigned magazine_number=data[i+5]&0x7; // 3 LSB unsigned teletext_page_number=data[i+6]; dbg_print (CCX_DMT_PMT, " ISO639: %c%c%c\n",c1>=0x20?c1:' ', c2>=0x20?c2:' ', diff --git a/src/wtv_functions.c b/src/wtv_functions.c index 16f7c623..0af62dfe 100644 --- a/src/wtv_functions.c +++ b/src/wtv_functions.c @@ -416,7 +416,6 @@ LLONG get_data(struct wtv_chunked_buffer *cb) { LLONG wtv_getmoredata(void) { - static long parsebufsize = 1024; static struct wtv_chunked_buffer cb; if(firstcall) { diff --git a/src/xds.c b/src/xds.c index f00e5809..d902dfb6 100644 --- a/src/xds.c +++ b/src/xds.c @@ -8,7 +8,6 @@ static int current_xds_month=-1; static int current_program_type_reported=0; // No. static int xds_start_time_shown=0; static int xds_program_length_shown=0; -static int xds_program_type_shown=0; static char xds_program_description[8][33]; static char current_xds_network_name[33]; @@ -377,18 +376,18 @@ void xds_do_copy_generation_management_system (unsigned c1, unsigned c2) static char rcd[256]; int changed=0; unsigned c1_6=(c1&0x40)>>6; - unsigned unused1=(c1&0x20)>>5; + /* unsigned unused1=(c1&0x20)>>5; */ unsigned cgms_a_b4=(c1&0x10)>>4; unsigned cgms_a_b3=(c1&0x8)>>3; unsigned aps_b2=(c1&0x4)>>2; unsigned aps_b1=(c1&0x2)>>1; - unsigned asb_0=(c1&0x1); + /* unsigned asb_0=(c1&0x1); */ unsigned c2_6=(c2&0x40)>>6; - unsigned c2_5=(c2&0x20)>>5; - unsigned c2_4=(c2&0x10)>>4; - unsigned c2_3=(c2&0x8)>>3; - unsigned c2_2=(c2&0x4)>>2; - unsigned c2_1=(c2&0x2)>>1; + /* unsigned c2_5=(c2&0x20)>>5; */ + /* unsigned c2_4=(c2&0x10)>>4; */ + /* unsigned c2_3=(c2&0x8)>>3; */ + /* unsigned c2_2=(c2&0x4)>>2; */ + /* unsigned c2_1=(c2&0x2)>>1; */ unsigned rcd0=(c2&0x1); if (!c1_6 || !c2_6) // These must be high. If not, not following specs return; @@ -538,13 +537,13 @@ int xds_do_current_and_future () int hour = cur_xds_payload[3] & 0x1f; // 5 bits int date = cur_xds_payload[4] & 0x1f; // 5 bits int month = cur_xds_payload[5] & 0xf; // 4 bits - int changed=0; + /* int changed=0; */ if (current_xds_min!=min || current_xds_hour!=hour || current_xds_date!=date || current_xds_month!=month) { - changed=1; + /* changed=1; */ xds_start_time_shown=0; current_xds_min=min; current_xds_hour=hour; @@ -835,7 +834,7 @@ int xds_do_misc () was_proc=1; if (cur_xds_payload_length<5) // We need 2 data bytes break; - int b6 = (cur_xds_payload[2] & 0x40) >>6; // Bit 6 should always be 1 + // int b6 = (cur_xds_payload[2] & 0x40) >>6; // Bit 6 should always be 1 int dst = (cur_xds_payload[2] & 0x20) >>5; // Daylight Saving Time int hour = cur_xds_payload[2] & 0x1f; // 5 bits dbg_print(CCX_DMT_XDS, "Local Time Zone: %02d DST: %d\n",