[vlc-devel] commit: Small simplification in cdda. (Laurent Aimar )
git version control
git at videolan.org
Sun Jan 18 14:40:34 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jan 18 14:39:03 2009 +0100| [c19b89e2e2d6a9589be4337e277b0791295a3ca1] | committer: Laurent Aimar
Small simplification in cdda.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c19b89e2e2d6a9589be4337e277b0791295a3ca1
---
modules/access/cdda.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index e6fd6fa..f507aef 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -436,16 +436,15 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
psz_name = NULL;
/* Create playlist items */
+ const mtime_t i_duration = (int64_t)( p_sys->p_sectors[i+1] - p_sys->p_sectors[i] ) *
+ CDDA_DATA_SIZE * 1000000 / 44100 / 2 / 2;
p_input_item = input_item_NewWithType( VLC_OBJECT( p_access ),
- psz_uri, psz_name, 0, NULL, 0, -1,
+ psz_uri, psz_name, 0, NULL, 0, i_duration,
ITEM_TYPE_DISC );
input_item_CopyOptions( p_current, p_input_item );
input_item_AddOption( p_input_item, psz_first, VLC_INPUT_OPTION_TRUSTED );
input_item_AddOption( p_input_item, psz_last, VLC_INPUT_OPTION_TRUSTED );
input_item_AddOption( p_input_item, psz_opt, VLC_INPUT_OPTION_TRUSTED );
- const mtime_t i_duration = (int64_t)( p_sys->p_sectors[i+1] - p_sys->p_sectors[i] ) *
- CDDA_DATA_SIZE * 1000000 / 44100 / 2 / 2;
- input_item_SetDuration( p_input_item, i_duration );
#ifdef HAVE_LIBCDDB
/* If we have CDDB info, change the name */
More information about the vlc-devel
mailing list