Skip to content

Commit a299d06

Browse files
authored
fix(xds): Don't output empty XDS content entries
2 parents 2f0770d + 50b51e4 commit a299d06

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib_ccx/ccx_decoders_xds.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,14 +472,17 @@ void xds_do_content_advisory(struct cc_subtitle *sub, struct ccx_decoders_xds_co
472472
if (!a1 && a0) // US TV parental guidelines
473473
{
474474
xdsprint(sub, ctx, age);
475-
xdsprint(sub, ctx, content);
475+
if (content[0]) // Only output content if not empty
476+
xdsprint(sub, ctx, content);
476477
if (changed)
477478
{
478479
ccx_common_logging.log_ftn("\rXDS: %s\n ", age);
479-
ccx_common_logging.log_ftn("\rXDS: %s\n ", content);
480+
if (content[0])
481+
ccx_common_logging.log_ftn("\rXDS: %s\n ", content);
480482
}
481483
ccx_common_logging.debug_ftn(CCX_DMT_DECODER_XDS, "\rXDS: %s\n", age);
482-
ccx_common_logging.debug_ftn(CCX_DMT_DECODER_XDS, "\rXDS: %s\n", content);
484+
if (content[0])
485+
ccx_common_logging.debug_ftn(CCX_DMT_DECODER_XDS, "\rXDS: %s\n", content);
483486
}
484487
if (!a0 || // MPA
485488
(a0 && a1 && !Da2 && !La3) || // Canadian English Language Rating

0 commit comments

Comments
 (0)