Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid xml tokens Issue#1235 #1653

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/lib_ccx/asf_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ uint32_t asf_readval(void *val, int ltype)
}
return rval;
}

char *gui_data_string(void *val)
{
static char sbuf[40];
Expand Down Expand Up @@ -72,7 +72,6 @@ int asf_get_more_data(struct lib_ccx_ctx *ctx, struct demuxer_data **ppdata)
// Except for the first call of this function we will reenter
// the Data Packet loop below.
int reentry = 1;

// Variables for Header Object
int64_t data_packets_count = 0;
int broadcast_flag = 0;
Expand Down Expand Up @@ -561,7 +560,7 @@ int asf_get_more_data(struct lib_ccx_ctx *ctx, struct demuxer_data **ppdata)
dbg_print(CCX_DMT_PARSE, "Number of data packets: %ld\n", (long)asf_data_container.TotalDataPackets);

reentry = 0; // Make sure we read the Data Packet Headers
} // End of if (firstcall)
}// End of if (firstcall)
firstcall = 0;

// Start loop over Data Packets
Expand Down
2 changes: 1 addition & 1 deletion src/lib_ccx/ccx_decoders_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int do_cb(struct lib_cc_decode *ctx, unsigned char *cc_block, struct cc_subtitle
default:
fatal(CCX_COMMON_EXIT_BUG_BUG, "In do_cb: Impossible value for cc_type, Please file a bug report on GitHub.\n");
} // switch (cc_type)
} // cc_valid
}// cc_valid
else
{
dbg_print(CCX_DMT_CBRAW, " .. .. ..\n");
Expand Down
33 changes: 31 additions & 2 deletions src/lib_ccx/ccx_encoders_spupng.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,40 @@ void spunpg_free(struct spupng_t *sp)
free(sp);
}

void sanitize_and_write_comment(FILE *fpxml, char *input_file)
{
char sanitized_file[300];
int j = 0;

for (int i = 0; input_file[i] != '\0' && j < sizeof(sanitized_file) - 1; i++)
{
if (input_file[i] == '-')
{
if (input_file[i + 1] == '-')
{
sanitized_file[j++] = ' ';
i++;
}
else
{
sanitized_file[j++] = input_file[i];
}
}
else
{
sanitized_file[j++] = input_file[i];
}
}

sanitized_file[j] = '\0';
fprintf(fpxml, "<!-- %s -->\n", sanitized_file);
}

void spupng_write_header(struct spupng_t *sp, int multiple_files, char *first_input_file)
{
fprintf(sp->fpxml, "<subpictures>\n<stream>\n");
fprintf(sp->fpxml, "<subpictures>\n<stream>\n");
if (multiple_files)
fprintf(sp->fpxml, "<!-- %s -->\n", first_input_file);
sanitize_and_write_comment(sp->fpxml, first_input_file);
}

void spupng_write_footer(struct spupng_t *sp)
Expand Down
2 changes: 1 addition & 1 deletion src/lib_ccx/dvb_subtitle_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define YUV_TO_RGB1_CCIR(cb1, cr1) \
{ \
cb = (cb1)-128; \
cr = (cr1)-128; \
cr = (cr1)-128; \
r_add = FIX(1.40200 * 255.0 / 224.0) * cr + ONE_HALF; \
g_add = -FIX(0.34414 * 255.0 / 224.0) * cb - FIX(0.71414 * 255.0 / 224.0) * cr + \
ONE_HALF; \
Expand Down
2 changes: 1 addition & 1 deletion src/lib_ccx/general_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ int general_loop(struct lib_ccx_ctx *ctx)
enum ccx_stream_mode_enum stream_mode;
struct demuxer_data *datalist = NULL;
struct demuxer_data *data_node = NULL;
int (*get_more_data)(struct lib_ccx_ctx * c, struct demuxer_data * *d);
int (*get_more_data)(struct lib_ccx_ctx *c, struct demuxer_data **d);
int ret;
int caps = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/lib_ccx/hardsubx_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ void process_hardsubx_linear_frames_and_normal_subs(struct lib_hardsubx_ctx *har
enum ccx_stream_mode_enum stream_mode;
struct demuxer_data *datalist = NULL;
struct demuxer_data *data_node = NULL;
int (*get_more_data)(struct lib_ccx_ctx * c, struct demuxer_data * *d);
int (*get_more_data)(struct lib_ccx_ctx *c, struct demuxer_data **d);
int ret;
int caps = 0;

Expand Down
1 change: 0 additions & 1 deletion src/lib_ccx/utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "ccx_common_option.h"
#include "activity.h"
#include "utility.h"

int temp_debug = 0; // This is a convenience variable used to enable/disable debug on variable conditions. Find references to understand.
volatile sig_atomic_t change_filename_requested = 0;

Expand Down
Loading