[MPlayer-dev-eng] [PATCH] Read normal duration when demuxing subtitles through lavf (v2)

Alexander Strasser eclipse7 at gmx.net
Wed Aug 1 21:25:49 CEST 2012


Hi,

Alexander Strasser wrote:
> Philip Langdale wrote:
> > Alexander Strasser <eclipse7 at gmx.net> wrote:
> > > Reimar wrote:
> > > > The intention was that endpts will only be set if the duration is >
> > > > 0. Subtitles never disappearing is better than them never appearing
> > > > because pts == endpts.
> > > 
> > >   I was just thinking about that. But am I the only one who finds the
> > > comment misleading?
> > > 
> > >   Anyway, I would propose to just pull the dp->endpts assignment into
> > > both branches of the inner if and directly use the corresponding
> > > duration member.
> > > 
> > >   Any objections? I would edit that myself when testing, so no need
> > > for a resending the patch.
> > 
> > No objections from me. I didn't intend to change the behaviour in
> > that way. Thanks.
> 
>   Me neither. I somehow misread the parens in the original if-condition
> and thus did not immediately notice until a few days later. Sorry for
> the delays I was not at home last weekend.
> 
>   Changed locally. I will probably commit it tomorrow evening.

  Commit delayed. Sorry :(

  Maybe I am confused, but when testing I could not find a sample
that triggered the (convergence_duration > 0) condition. But I
rather saw many samples where (convergence_duration == 0) and
(duration != 0). Seems recent lavf does not set convergence_duration
that often.

  So committing the code that behaves exactly like the current
version but does use duration if it is available would actually
change the endpts pretty often AFAICT.

  Would be really nice if someone could demystify this.

  I will resort to studying FFmpeg history next. Maybe something
was changed and there was no corresponding change in MPlayer to
adapt to it.

  Alexander


More information about the MPlayer-dev-eng mailing list