Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CVS
mac/ccextractor
linux/ccextractor
linux/depend
linux/build_scan/
windows/x86_64-pc-windows-msvc/**
windows/Debug/**
windows/Debug-OCR/**
Expand All @@ -28,6 +29,7 @@ windows/Debug-Full/**
windows/x64/**
windows/ccextractor.VC.db
build/
build_*/

####
# Python
Expand Down
9 changes: 4 additions & 5 deletions src/lib_ccx/avc_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,10 @@ void sei_rbsp(struct avc_ctx *ctx, unsigned char *seibuf, unsigned char *seiend)
}
else
{
// TODO: This really really looks bad
mprint("WARNING: Unexpected SEI unit length...trying to continue.");
temp_debug = 1;
mprint("\n Failed block (at sei_rbsp) was:\n");
dump(CCX_DMT_GENERIC_NOTICES, (unsigned char *)seibuf, seiend - seibuf, 0, 0);
// Unexpected SEI length - common with malformed streams, don't spam output
dbg_print(CCX_DMT_VERBOSE, "WARNING: Unexpected SEI unit length (parsed to %p, expected %p)...trying to continue.\n",
(void *)tbuf, (void *)(seiend - 1));
dump(CCX_DMT_VERBOSE, (unsigned char *)seibuf, seiend - seibuf, 0, 0);

ctx->num_unexpected_sei_length++;
}
Expand Down
6 changes: 1 addition & 5 deletions src/lib_ccx/general_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int ps_get_more_data(struct lib_ccx_ctx *ctx, struct demuxer_data **ppdata)
if (!ctx->demux_ctx->strangeheader)
{
mprint("\nNot a recognized header. Searching for next header.\n");
dump(CCX_DMT_GENERIC_NOTICES, nextheader, 6, 0, 0);
dump(CCX_DMT_PARSE, nextheader, 6, 0, 0);
// Only print the message once per loop / unrecognized header
ctx->demux_ctx->strangeheader = 1;
}
Expand Down Expand Up @@ -809,10 +809,6 @@ int process_data(struct encoder_ctx *enc_ctx, struct lib_cc_decode *dec_ctx, str
got = data_node->len;
}
}
else if (data_node->bufferdatatype == CCX_PRIVATE_MPEG2_CC)
{
got = data_node->len; // Do nothing. Still don't know how to process it
}
else if (data_node->bufferdatatype == CCX_RAW) // Raw two byte 608 data from DVR-MS/ASF
{
// The asf_get_more_data() loop sets current_pts when possible
Expand Down
18 changes: 4 additions & 14 deletions src/lib_ccx/ts_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,11 @@ enum ccx_bufferdata_type get_buffer_type(struct cap_info *cinfo)
{
return CCX_TELETEXT;
}
else if (cinfo->stream == CCX_STREAM_TYPE_PRIVATE_MPEG2 && cinfo->codec == CCX_CODEC_ATSC_CC)
{
return CCX_PRIVATE_MPEG2_CC;
}
else if (cinfo->stream == CCX_STREAM_TYPE_PRIVATE_USER_MPEG2 && cinfo->codec == CCX_CODEC_ATSC_CC)
else if ((cinfo->stream == CCX_STREAM_TYPE_PRIVATE_MPEG2 ||
cinfo->stream == CCX_STREAM_TYPE_PRIVATE_USER_MPEG2) &&
cinfo->codec == CCX_CODEC_ATSC_CC)
{
// ATSC CC can be in either private stream type - process both as PES
return CCX_PES;
}
else
Expand Down Expand Up @@ -567,15 +566,6 @@ int copy_capbuf_demux_data(struct ccx_demuxer *ctx, struct demuxer_data **data,
if (!cinfo->capbuf || !cinfo->capbuflen)
return -1;

if (ptr->bufferdatatype == CCX_PRIVATE_MPEG2_CC)
{
dump(CCX_DMT_GENERIC_NOTICES, cinfo->capbuf, cinfo->capbuflen, 0, 1);
// Bogus data, so we return something
ptr->buffer[ptr->len++] = 0xFA;
ptr->buffer[ptr->len++] = 0x80;
ptr->buffer[ptr->len++] = 0x80;
return CCX_OK;
}
if (cinfo->codec == CCX_CODEC_TELETEXT)
{
memcpy(ptr->buffer + ptr->len, cinfo->capbuf, cinfo->capbuflen);
Expand Down
Loading