Skip to content
Open
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
9 changes: 9 additions & 0 deletions src/lib_ccx/general_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,19 @@ void process_hex(struct lib_ccx_ctx *ctx, char *filename)
}
/* const char *mpeg_header="00 00 01 b2 43 43 01 f8 "; // Always present */
FILE *fr = fopen(filename, "rt");
if (!fr)
{
fatal(EXIT_READ_ERROR, "In process_hex: Unable to open file %s for reading.", filename);
}
unsigned char *bytes = NULL;
unsigned byte_count = 0;
int warning_shown = 0;
struct demuxer_data *data = alloc_demuxer_data();
if (!data)
{
fclose(fr);
fatal(EXIT_NOT_ENOUGH_MEMORY, "In process_hex: Out of memory allocating demuxer data.");
}
while (fgets(line, max - 1, fr) != NULL)
{
char *c1, *c2 = NULL; // Positions for first and second colons
Expand Down
Loading