[vlc-commits] codec: cea608/708: fix bitrate

Francois Cartegnie git at videolan.org
Fri Dec 29 20:06:53 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec 29 17:21:07 2017 +0100| [1a1d75cc9668a08e6f14d8726db7e51a9b72ec51] | committer: Francois Cartegnie

codec: cea608/708: fix bitrate

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1a1d75cc9668a08e6f14d8726db7e51a9b72ec51
---

 modules/codec/cc.c     | 2 +-
 modules/codec/cea708.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index 7e98722531..cc52ba8e05 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -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 )
diff --git a/modules/codec/cea708.c b/modules/codec/cea708.c
index a6a6beb7bd..56df9bbe43 100644
--- a/modules/codec/cea708.c
+++ b/modules/codec/cea708.c
@@ -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;
     }
 }
 



More information about the vlc-commits mailing list