vlc/vlc-1.2 | branch: master | Francois Cartegnie <[email protected]> | Fri Dec 9 21:41:11 2011 +0100| [b91480124654422791d1ae31bf79c456a864fad5] | committer: Jean-Baptiste Kempf
demux: dvdnav: add chapters seekpoints timings (cherry picked from commit ea5c435f241e69b540c94bc08fef217a6bae542f) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=b91480124654422791d1ae31bf79c456a864fad5 --- modules/access/dvdnav.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c index dcf9310..c462ef2 100644 --- a/modules/access/dvdnav.c +++ b/modules/access/dvdnav.c @@ -1003,13 +1003,11 @@ static void DemuxTitles( demux_t *p_demux ) uint64_t i_title_length; #if defined(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS) - uint64_t *p_chapters_time; + uint64_t *p_chapters_time = NULL; i_chapters = dvdnav_describe_title_chapters( p_sys->dvdnav, i, &p_chapters_time, &i_title_length ); - if( i_chapters > 0 ) - free( p_chapters_time ); - else + if( i_chapters < 1 ) i_title_length = 0; #else if( dvdnav_get_number_of_parts( p_sys->dvdnav, i, &i_chapters ) != DVDNAV_STATUS_OK ) @@ -1021,9 +1019,14 @@ static void DemuxTitles( demux_t *p_demux ) for( int j = 0; j < __MAX( i_chapters, 1 ); j++ ) { s = vlc_seekpoint_New(); +#if defined(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS) + s->i_time_offset = p_chapters_time[j] * 1000 / 90; +#endif TAB_APPEND( t->i_seekpoint, t->seekpoint, s ); } - +#if defined(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS) + free( p_chapters_time ); +#endif TAB_APPEND( p_sys->i_title, p_sys->title, t ); } } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
