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

Jean-Baptiste Kempf git at videolan.org
Tue Jan 6 11:50:23 CET 2015


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

CDDB: add the correct pregap for calculation

150sectors or 2 seconds

Should close #4370

(cherry picked from commit a4271ec9be0f0235b8fc9010e6135afc2365136a)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 c93995b..1958867 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -652,11 +652,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