diff --git a/.gitignore b/.gitignore index bdb5246d4..a8b4db72d 100644 --- a/.gitignore +++ b/.gitignore @@ -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/** @@ -28,6 +29,7 @@ windows/Debug-Full/** windows/x64/** windows/ccextractor.VC.db build/ +build_*/ #### # Python diff --git a/src/lib_ccx/avc_functions.c b/src/lib_ccx/avc_functions.c index aa58e991d..cc195edce 100644 --- a/src/lib_ccx/avc_functions.c +++ b/src/lib_ccx/avc_functions.c @@ -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++; } diff --git a/src/lib_ccx/general_loop.c b/src/lib_ccx/general_loop.c index d82a03314..a99cfe144 100644 --- a/src/lib_ccx/general_loop.c +++ b/src/lib_ccx/general_loop.c @@ -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; } @@ -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 diff --git a/src/lib_ccx/ts_functions.c b/src/lib_ccx/ts_functions.c index 44a199260..12702dc4c 100644 --- a/src/lib_ccx/ts_functions.c +++ b/src/lib_ccx/ts_functions.c @@ -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 @@ -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);