diff --git a/src/lib_ccx/ccx_encoders_smptett.c b/src/lib_ccx/ccx_encoders_smptett.c index 79500444..3becef9a 100644 --- a/src/lib_ccx/ccx_encoders_smptett.c +++ b/src/lib_ccx/ccx_encoders_smptett.c @@ -151,8 +151,12 @@ int write_cc_bitmap_as_smptett(struct cc_subtitle *sub, struct encoder_ctx *cont } } } + for (i = 0, rect = sub->data; i < sub->nb_data; i++, rect++) + { + freep(rect->data); + freep(rect->data + 1); + } #endif - sub->nb_data = 0; freep(&sub->data); return ret;