From 5e22be257600926736d0da1fc7d03be9b242494f Mon Sep 17 00:00:00 2001 From: Anshul Maheshwari Date: Sun, 12 Oct 2014 03:56:00 +0530 Subject: [PATCH] reverted back the changes of adding exra byte --- src/ccextractor.c | 2 +- src/lib_ccx/es_userdata.c | 2 +- src/lib_ccx/sequencing.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ccextractor.c b/src/ccextractor.c index dce08fe1..340dba4a 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -459,7 +459,7 @@ int main(int argc, char *argv[]) } else - cc_count = (len-2)/3; + cc_count = len/3; store_hdcc(ctx, bptr, cc_count, i++,fts_now,&dec_sub); if(dec_sub.got_output) { diff --git a/src/lib_ccx/es_userdata.c b/src/lib_ccx/es_userdata.c index 5ab3f90a..2477be45 100644 --- a/src/lib_ccx/es_userdata.c +++ b/src/lib_ccx/es_userdata.c @@ -142,7 +142,7 @@ int user_data(struct lib_ccx_ctx *ctx, struct bitstream *ustream, int udtype, st { if ((ud_header[1]&0x7F) == 0x01) { - unsigned char cc_data[3*31+2]; // Maximum cc_count is 31 + unsigned char cc_data[3*31+1]; // Maximum cc_count is 31 ctx->stat_scte20ccheaders++; read_bytes(ustream, 2); // "03 01" diff --git a/src/lib_ccx/sequencing.c b/src/lib_ccx/sequencing.c index 0e19c017..89fb0d93 100644 --- a/src/lib_ccx/sequencing.c +++ b/src/lib_ccx/sequencing.c @@ -11,7 +11,7 @@ int cc_data_count[SORTBUF]; // Store fts; static LLONG cc_fts[SORTBUF]; // Store HD CC packets -unsigned char cc_data_pkts[SORTBUF][10*31*3+2]; // *10, because MP4 seems to have different limits +unsigned char cc_data_pkts[SORTBUF][10*31*3+1]; // *10, because MP4 seems to have different limits // Set to true if data is buffered int has_ccdata_buffered = 0; @@ -29,7 +29,7 @@ void init_hdcc (void) cc_data_count[j] = 0; cc_fts[j] = 0; } - memset(cc_data_pkts, 0, SORTBUF*(31*3+2)); + memset(cc_data_pkts, 0, SORTBUF*(31*3+1)); has_ccdata_buffered = 0; }