From 9358978a61905c266bcf90b168d0177389a801b3 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Fri, 27 Feb 2015 20:47:50 +0530 Subject: [PATCH] Fixes output for field_2 --- src/lib_ccx/ccx_decoders_structs.h | 1 + src/lib_ccx/general_loop.c | 3 ++- src/lib_ccx/output.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib_ccx/ccx_decoders_structs.h b/src/lib_ccx/ccx_decoders_structs.h index 8172494d..e7bfc5fa 100644 --- a/src/lib_ccx/ccx_decoders_structs.h +++ b/src/lib_ccx/ccx_decoders_structs.h @@ -99,6 +99,7 @@ struct lib_cc_decode enum ccx_output_format write_format; // 0=Raw, 1=srt, 2=SMI struct ccx_boundary_time extraction_start, extraction_end; // Segment we actually process void *wbout1; + void *wbout2; LLONG subs_delay; // ms to delay (or advance) subs }; diff --git a/src/lib_ccx/general_loop.c b/src/lib_ccx/general_loop.c index 3a00fa2a..432e5bbd 100644 --- a/src/lib_ccx/general_loop.c +++ b/src/lib_ccx/general_loop.c @@ -538,7 +538,8 @@ void general_loop(struct lib_ccx_ctx *ctx, void *enc_ctx) struct cc_subtitle dec_sub; struct lib_cc_decode *dec_ctx = NULL; dec_ctx = ctx->dec_ctx; - dec_ctx->wbout1 = (struct ccx_s_write*)&ctx->wbout1 ; + dec_ctx->wbout1 = (struct ccx_s_write*)&ctx->wbout1 ; + dec_ctx->wbout2 = (struct ccx_s_write*)&ctx->wbout2 ; inbuf = 0; // No data yet end_of_file = 0; diff --git a/src/lib_ccx/output.c b/src/lib_ccx/output.c index a8c59baf..94c5cc80 100644 --- a/src/lib_ccx/output.c +++ b/src/lib_ccx/output.c @@ -111,7 +111,7 @@ void printdata (struct lib_cc_decode *ctx, const unsigned char *data1, int lengt struct ccx_decoder_608_context *field_2 = ctx->context_cc608_field_2; struct ccx_s_write *wbout1 = ctx->wbout1; field_1->out = ctx->wbout1 ; - field_2->out = ctx->wbout1 ; + field_2->out = ctx->wbout2 ; if (ctx->write_format==CCX_OF_DVDRAW) writeDVDraw (data1, length1, data2, length2, wbout1); else /* Broadcast raw or any non-raw */