From 827ace8dca843cdea3294cb110c174e99acd3f3b Mon Sep 17 00:00:00 2001 From: Saurabh Shrivastava Date: Wed, 11 Jan 2017 05:56:23 +0530 Subject: [PATCH] SMPTE-TT : Removed appearance of garbage value in color code. (#625) Also polished and improved existing code. More details : CCExtractor#620 --- src/lib_ccx/ccx_encoders_smptett.c | 269 ++++++++++++++--------------- 1 file changed, 133 insertions(+), 136 deletions(-) diff --git a/src/lib_ccx/ccx_encoders_smptett.c b/src/lib_ccx/ccx_encoders_smptett.c index 97b7c8f1..e66dffa5 100644 --- a/src/lib_ccx/ccx_encoders_smptett.c +++ b/src/lib_ccx/ccx_encoders_smptett.c @@ -116,8 +116,7 @@ int write_cc_bitmap_as_smptett(struct cc_subtitle *sub, struct encoder_ctx *cont struct cc_bitmap* rect; LLONG ms_start, ms_end; //char timeline[128]; - int len = 0; - int i = 0; + int i,len = 0; ms_start = sub->start_time; ms_end = sub->end_time; @@ -158,6 +157,7 @@ int write_cc_bitmap_as_smptett(struct cc_subtitle *sub, struct encoder_ctx *cont freep(rect->data + 1); } #endif + sub->nb_data = 0; freep(&sub->data); return ret; @@ -279,152 +279,149 @@ int write_cc_buffer_as_smptett(struct eia608_screen *data, struct encoder_ctx *c +1000 because huge and