[FFmpeg-devel] [PATCH] Print chapter info in dump_format().
Michael Niedermayer
michaelni
Sun Feb 28 18:50:20 CET 2010
On Sun, Feb 28, 2010 at 03:32:59PM +0100, Anton Khirnov wrote:
> On Sun, Feb 28, 2010 at 01:44:07PM +0100, Michael Niedermayer wrote:
> > On Sun, Feb 28, 2010 at 09:40:03AM +0100, Anton Khirnov wrote:
> > > ---
> > > libavformat/utils.c | 14 ++++++++++++++
> > > 1 files changed, 14 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/libavformat/utils.c b/libavformat/utils.c
> > > index 1fbceea..a79f789 100644
> > > --- a/libavformat/utils.c
> > > +++ b/libavformat/utils.c
> > > @@ -3009,6 +3009,20 @@ void dump_format(AVFormatContext *ic,
> > > }
> > > av_log(NULL, AV_LOG_INFO, "\n");
> > > }
> > > + for (i = 0; i < ic->nb_chapters; i++) {
> > > + AVChapter *ch = ic->chapters[i];
> > > + int secs, us;
> > > +
> > > + av_log(NULL, AV_LOG_INFO, " Chapter #%d.%d: ", index, i);
> >
> > > + secs = av_rescale_q(ch->start, ch->time_base, (AVRational){1, 1});
> > > + us = av_rescale_q(ch->start, ch->time_base, AV_TIME_BASE_Q) % AV_TIME_BASE;
> > > + av_log(NULL, AV_LOG_INFO, "start %d.%06d, ", secs, us);
> >
> > i think something along the line of
> > av_log(NULL, AV_LOG_INFO, "start %f", ch->start / av_q2d(ch->time_base)
> > might be cleaner but maybe theressome rounding or bitexact display isue
> > with it i dunno
> >
> ok, changed
>
> Anton Khirnov
> utils.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
> 47de19cb4d4525dbfc1d6c3fd55aa6655370f944 0001-Print-chapter-info-in-dump_format.patch
> From 5ef6129ace1aea1459252162f7ee78922f029439 Mon Sep 17 00:00:00 2001
> From: Anton Khirnov <wyskas at gmail.com>
> Date: Sun, 28 Feb 2010 09:35:53 +0100
> Subject: [PATCH] Print chapter info in dump_format().
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100228/2d4c784d/attachment.pgp>
More information about the ffmpeg-devel
mailing list