Skip to content

Commit

Permalink
Fix column length (#1345)
Browse files Browse the repository at this point in the history
* Fix column length
Don't take column length from curr_window, as row could from any window

* update CHANGES.TXT
  • Loading branch information
PunitLodha committed Jun 11, 2021
1 parent e86e869 commit e09abe7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
3 changes: 3 additions & 0 deletions docs/CHANGES.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
- Fix: Write multitrack files to the output file directory
- Fix: Correct frame number calculation in SCC (#1340)
- Fix: Regression on Teletext that caused dates to be wrong (RT 78 on the sample platform)
- Fix: CEA-708: Better timing, fixes for missing subtitles
- Fix: timing for direct rollup
- Fix: timing for VOB files with multiple chapters

0.88 (2019-05-21)
-----------------
Expand Down
13 changes: 2 additions & 11 deletions src/lib_ccx/ccx_decoders_708_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,7 @@ void _dtvcc_write_row(ccx_dtvcc_writer_ctx *writer, ccx_dtvcc_service_decoder *d
ccx_dtvcc_pen_attribs pen_attribs = ccx_dtvcc_default_pen_attribs;
_dtvcc_get_write_interval(tv, row_index, &first, &last);

if (decoder->current_window == -1)
ccx_common_logging.log_ftn("[CEA-708] _dtvcc_write_row: Window has to be defined first\n");

int length;
if (decoder->current_window == -1) // Bug - in this case we have broken timing. See issue in GitHub
length = last + 1;
else
length = decoder->windows[decoder->current_window].col_count;

for (int i = 0; i < length; i++)
for (int i = 0; i < last + 1; i++)
{

if (use_colors)
Expand All @@ -154,7 +145,7 @@ void _dtvcc_write_row(ccx_dtvcc_writer_ctx *writer, ccx_dtvcc_service_decoder *d

pen_color = tv->pen_colors[row_index][i];
pen_attribs = tv->pen_attribs[row_index][i];
if (i < first || i > last)
if (i < first)
{
size_t size = write_utf16_char(' ', buf + buf_len);
buf_len += size;
Expand Down

0 comments on commit e09abe7

Please sign in to comment.