return 0;
}
- subtitle->id = (hb_list_count(job->list_subtitle) << 8) | 0xFF;
+ subtitle->id = (hb_list_count(job->list_subtitle) << 8) |
+ HB_SUBTITLE_IMPORT_TAG;
subtitle->format = TEXTSUB;
subtitle->source = source;
subtitle->codec = source == IMPORTSRT ? WORK_DECSRTSUB : WORK_DECSSASUB;
#define HB_SUBTITLE_ATTR_PANSCAN 0x0200
#define HB_SUBTITLE_ATTR_DEFAULT 0x0400
+#define HB_SUBTITLE_IMPORT_TAG 0xFF000000
+#define HB_SUBTITLE_EMBEDDED_CC_TAG 0xFE000000
+
struct hb_subtitle_s
{
int id;
subtitle = calloc(sizeof( hb_subtitle_t ), 1);
subtitle->track = hb_list_count(pv->title->list_subtitle);
- subtitle->id = 0;
+ subtitle->id = HB_SUBTITLE_EMBEDDED_CC_TAG;
subtitle->format = TEXTSUB;
subtitle->source = CC608SUB;
subtitle->config.dest = PASSTHRUSUB;
while ((subtitle = hb_list_item(job->list_subtitle, i++)) != NULL)
{
- if (subtitle->source == CC608SUB)
+ if (subtitle->source == CC608SUB &&
+ subtitle->id == HB_SUBTITLE_EMBEDDED_CC_TAG)
{
if (pv->list_subtitle == NULL)
{
{
// If the subtitle track is CC embedded in the video stream, then
// it does not have an independent pid. In this case, we assigned
- // the subtitle->id to 0.
- if (subtitle->id != 0)
+ // the subtitle->id to HB_SUBTITLE_EMBEDDED_CC_TAG.
+ if (subtitle->id != HB_SUBTITLE_EMBEDDED_CC_TAG)
{
pid = subtitle->id & 0xFFFF;
stream_type = subtitle->stream_type;