[MPlayer-dev-eng] [PATCH]chapters in lavf demuxer

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Jun 16 17:54:56 CEST 2008


Hello,
On Fri, May 30, 2008 at 08:30:35AM +0200, Anton Khirnov wrote:
> On Thu, May 29, 2008 at 11:50 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Thu, May 29, 2008 at 10:35:44PM +0200, Anton Khirnov wrote:
> >> On Thu, May 29, 2008 at 9:10 PM, Aurelien Jacobs <aurel at gnuage.org> wrote:
> >> >
> >> > It may be even better to factorize this inside demuxer_add_chapter().
> >> >
> >> > Aurel
> >> >
> >>
> >> I thought demuxer_add_chapter will check for NULL itself. well
> >> nevermind, it does now.
> >>
> >> Anton
> >
> >> Index: libmpdemux/demux_lavf.c
> >> ===================================================================
> >> --- libmpdemux/demux_lavf.c   (revision 26920)
> >> +++ libmpdemux/demux_lavf.c   (working copy)
> >> @@ -477,6 +477,13 @@
> >>  //    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 = c->start * 1000 * c->time_base.num / c->time_base.den;
> >> +        uint64_t end = c->end * 1000 * c->time_base.num / c->time_base.den;
> >
> > This should use av_rescale_q() so it wont overflow.
> > Also it could be vertically aligned for beauty:
> >        uint64_t start = c->start * 1000 * c->time_base.num / c->time_base.den;
> >        uint64_t end   = c->end   * 1000 * c->time_base.num / c->time_base.den;
> >
> > and except that iam fine with the patch if everyone else is ...
> >
> 
> done

Both applied, thanks for your effort and persistence.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list