moving write header in init_encoder

RCWT header can't have a BOM before it, or parsing it later will not
be possible
This commit is contained in:
Anshul Maheshwari 2014-07-13 18:40:50 +05:30
parent 874abf6442
commit 136012c558

View File

@ -483,7 +483,8 @@ int main(int argc, char *argv[])
case CCX_OF_DVDRAW:
break;
case CCX_OF_RCWT:
write_subtitle_file_header(context_cc608_field_1.out); // RCWT header can't have a BOM before it, or parsing it later will not be possible.
if( init_encoder(enc_ctx,&wbout1) )
fatal (EXIT_NOT_ENOUGH_MEMORY, "Not enough memory\n");
break;
default:
if (ccx_options.encoding==CCX_ENC_UTF_8) // Write BOM
@ -527,7 +528,8 @@ int main(int argc, char *argv[])
case CCX_OF_DVDRAW:
break;
case CCX_OF_RCWT:
write_subtitle_file_header(context_cc608_field_2.out); // RCWT header can't have a BOM before it, or parsing it later will not be possible.
if( init_encoder(enc_ctx+1,&wbout2) )
fatal (EXIT_NOT_ENOUGH_MEMORY, "Not enough memory\n");
break;
default:
if (ccx_options.encoding==CCX_ENC_UTF_8) // Write BOM