From 49bccde7d9b39ac0a0b5a057061a7c299231179a Mon Sep 17 00:00:00 2001 From: Anshul Maheshwari Date: Sat, 24 May 2014 21:52:14 +0530 Subject: [PATCH] Remove redundant code from 608_spupng using function in spupng.c to write spu tags and comment --- src/608_spupng.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/608_spupng.c b/src/608_spupng.c index ba1677f6..9b7c802b 100644 --- a/src/608_spupng.c +++ b/src/608_spupng.c @@ -205,6 +205,7 @@ spupng_write_ccbuffer(struct spupng_t *sp, struct eia608_screen* data, int row; int empty_buf = 1; + char str[256] = ""; for (row = 0; row < 15; row++) { if (data->row_used[row]) @@ -233,19 +234,7 @@ spupng_write_ccbuffer(struct spupng_t *sp, struct eia608_screen* data, sp->pngfile, strerror(errno)); } fclose(sp->fppng); - - fprintf(sp->fpxml, "fpxml, " end=\"%.3f\"", ((double)ms_end) / 1000); - dbg_print(CCX_DMT_608, " end=\"%.3f\"", ((double)ms_end) / 1000); - fprintf(sp->fpxml, " image=\"%s\"", sp->pngfile); - dbg_print(CCX_DMT_608, " image=\"%s\"", sp->pngfile); - fprintf(sp->fpxml, " xoffset=\"%d\"", sp->xOffset); - dbg_print(CCX_DMT_608, " xoffset=\"%d\"", sp->xOffset); - fprintf(sp->fpxml, " yoffset=\"%d\"", sp->yOffset); - dbg_print(CCX_DMT_608, " yoffset=\"%d\"", sp->yOffset); - fprintf(sp->fpxml, ">\n\n"); - dbg_print(CCX_DMT_608, "-->\n"); - - fflush(sp->fpxml); - + + write_spucomment(sp,str); return 1; } int write_cc_buffer_as_spupng(struct eia608_screen *data,struct s_context_cc608 *context)