From 315d466da80cf975748410b69862bb957df54511 Mon Sep 17 00:00:00 2001 From: Anshul Maheshwari Date: Mon, 14 Jul 2014 18:47:54 +0530 Subject: [PATCH] updated mythtv for encoder --- src/myth.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/myth.c b/src/myth.c index 3883561d..44c938ea 100644 --- a/src/myth.c +++ b/src/myth.c @@ -841,6 +841,7 @@ void myth_loop(void *enc_ctx) fatal (EXIT_NOT_ENOUGH_MEMORY, "Not enough memory.\n"); saved=0; + memset(&dec_sub, 0, sizeof(dec_sub)); while (!processed_enough && (rc=mpegps_read_packet ())==0) { position_sanity_check(); @@ -889,7 +890,7 @@ void myth_loop(void *enc_ctx) } else { - if (total_inputsize>0 ) + if (total_inputsize > 0 ) { int progress = (int) ((((total_past+past)>>8)*100)/(total_inputsize>>8)); if (last_reported_progress != progress) @@ -902,6 +903,11 @@ void myth_loop(void *enc_ctx) } } } + if (dec_sub.got_output) + { + encode_sub(enc_ctx,&dec_sub); + dec_sub.got_output = 0; + } } if (desp) free (desp);