removed global buffer
pass subtitle in write_cc_buffer from general loop
seprated output function
init encoder and dinit encoder have more function
set size at correct place
corrected timing for srt sami smptett
corrected timing for ttext