[vlc-commits] CDDB: add the correct pregap for calculation

Jean-Baptiste Kempf git at videolan.org
Fri Jan 2 15:45:57 CET 2015


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jan  2 15:20:57 2015 +0100| [a4271ec9be0f0235b8fc9010e6135afc2365136a] | committer: Jean-Baptiste Kempf

CDDB: add the correct pregap for calculation

150sectors or 2 seconds

Should close #4370

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

 modules/access/cdda.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 5d31a7d..dd483e6 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -662,11 +662,12 @@ static cddb_disc_t *GetCDDBInfo( access_t *p_access, int i_titles, int *p_sector
         goto error;
     }
 
-    int64_t i_length = 0;
+    int64_t i_length = 2000000; /* PreGap */
     for( int i = 0; i < i_titles; i++ )
     {
         cddb_track_t *t = cddb_track_new();
-        cddb_track_set_frame_offset( t, p_sectors[i] );
+        cddb_track_set_frame_offset( t, p_sectors[i] + 150 );  /* Pregap offset */
+
         cddb_disc_add_track( p_disc, t );
         const int64_t i_size = ( p_sectors[i+1] - p_sectors[i] ) *
                                (int64_t)CDDA_DATA_SIZE;



More information about the vlc-commits mailing list