[MPlayer-cvslog] r27090 - trunk/libmpdemux/demux_lavf.c
reimar
subversion at mplayerhq.hu
Mon Jun 16 17:54:29 CEST 2008
Author: reimar
Date: Mon Jun 16 17:54:29 2008
New Revision: 27090
Log:
Chapter support for lavf demuxer.
Patch by Anton Khirnov [wyskas gmail com]
Modified:
trunk/libmpdemux/demux_lavf.c
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c (original)
+++ trunk/libmpdemux/demux_lavf.c Mon Jun 16 17:54:29 2008
@@ -477,6 +477,13 @@ static demuxer_t* demux_open_lavf(demuxe
// if(avfc->track ) demux_info_add(demuxer, "track" , avfc->track );
if(avfc->genre [0]) demux_info_add(demuxer, "genre" , avfc->genre );
+ for(i=0; i < avfc->nb_chapters; i++) {
+ AVChapter *c = avfc->chapters[i];
+ uint64_t start = av_rescale_q(c->start, c->time_base, (AVRational){1,1000});
+ uint64_t end = av_rescale_q(c->end, c->time_base, (AVRational){1,1000});
+ demuxer_add_chapter(demuxer, c->title, start, end);
+ }
+
if(avfc->nb_programs) {
int p, start=0, found=0;
More information about the MPlayer-cvslog
mailing list