From 0d04f83e98dc2224429c7b4674771be3c7f2a1d6 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 8 Feb 2005 11:28:54 +0000 Subject: [PATCH] ext/cdparanoia/gstcdparanoia.c: Fix track calculations (#166208). Original commit message from CVS: * ext/cdparanoia/gstcdparanoia.c: (cdparanoia_convert): Fix track calculations (#166208). --- ChangeLog | 5 +++++ ext/cdparanoia/gstcdparanoia.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2056bc9..1d2ad85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-08 Ronald S. Bultje + + * ext/cdparanoia/gstcdparanoia.c: (cdparanoia_convert): + Fix track calculations (#166208). + 2005-02-08 Gergely Nagy Reviewed by: Ronald S. Bultje diff --git a/ext/cdparanoia/gstcdparanoia.c b/ext/cdparanoia/gstcdparanoia.c index 23ed90c..6909b36 100644 --- a/ext/cdparanoia/gstcdparanoia.c +++ b/ext/cdparanoia/gstcdparanoia.c @@ -1055,10 +1055,11 @@ cdparanoia_convert (GstPad * pad, *dest_value = sector; } else if (*dest_format == track_format) { /* if we go past the last sector, make sure to report the last track */ - if (sector > src->last_sector) + if (sector > src->last_sector - src->first_sector) *dest_value = cdda_sector_gettrack (src->d, src->last_sector); else - *dest_value = cdda_sector_gettrack (src->d, sector) - 1; + *dest_value = cdda_sector_gettrack (src->d, + sector + src->first_sector) - 1; } else { return FALSE; } -- 2.7.4