Commit a2348f7b authored by François Cartegnie's avatar François Cartegnie 🤞

codec: cea608/708: fix bitrate

(cherry picked from commit 1a1d75cc)
parent bcbb9b7c
......@@ -540,7 +540,7 @@ static void Convert( decoder_t *p_dec, mtime_t i_pts,
{
if( (p_buffer[0] & 0x04) /* Valid bit */ )
{
const mtime_t i_spupts = i_pts + i_ticks * CLOCK_FREQ / 30;
const mtime_t i_spupts = i_pts + i_ticks * CLOCK_FREQ / (1200/3);
/* Mask off the specific i_field bit, else some sequences can be lost. */
if ( p_sys->p_eia608 &&
(p_buffer[0] & 0x03) == p_sys->i_field )
......
......@@ -1656,7 +1656,7 @@ static void CEA708_Decode_ServiceBuffer( cea708_t *h )
/* Update internal clock */
const uint8_t i_consumed = i_in - cea708_input_buffer_size( &h->input_buffer );
if( i_consumed )
h->i_clock += CLOCK_FREQ / 1200 * i_consumed;
h->i_clock += CLOCK_FREQ / 9600 * i_consumed;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment