[MPlayer-dev-eng] [PATCH] Print chapter info with -identify

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jun 28 10:11:15 CEST 2009


On Sat, Jun 27, 2009 at 09:25:54PM +0200, Adrian Stutz wrote:
> On Sat, Jun 27, 2009 at 8:10 PM, Reimar
> Döffinger<Reimar.Doeffinger at gmx.de> wrote:
> > On Sat, Jun 27, 2009 at 07:57:12PM +0200, Adrian Stutz wrote:
> >> This patch updates demuxer_add_chapter to print all known chapter
> >> information in a similar style to the video, audio and subtitle stream
> >> messages.
> >
> > IMHO your patches are a bit the wrong way round, I think it would be better
> > if chapter counting started with 0, just like the stream IDs, even though
> > I admit it is not ideal for e.g. DVD chapters.
> 
> I did first tend to change all to zero-based numbering but then
> diverted away from it because this way all chapter numbers can be
> consistent in the output, slave commands, the osd as well as how
> chapters are usually numbered.
> 
> AFAIK, hinted by the recent patch to change the upper limit for
> switch_audio/video, the audio and video stream IDs don't necessarily
> need to represent a zero-based index, either.

No, but it is handled in a more sane way.

> I also don't see a strong point in favor of a zero-based index. Sure
> it's easier to just use the array index but I think the fact that the
> ID then would be handled differently depending on the context is a
> bigger issue.

The reason why I dislike it is that it adds extra code to do it, is a
bit inconsistent with what is common for aid/vid/sid, and in your
particular case also adds a bug, the return value of add_chapter is now
one too large.

> Though it's not that I care so much. If you insist, I'll update the
> patches to zero-based numbering.

I won't really insist, I just have the feeling that the 1-based
numbering (at least unless done in a more flexible/whatever way)
is going to be a bit of a maintenance issue.



More information about the MPlayer-dev-eng mailing list