[MPlayer-users] Head does not display PGS subtitles. ffmpeg issue?

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Aug 23 17:19:13 CEST 2014

On Sat, Aug 23, 2014 at 04:35:03PM +0200, wm4 wrote:
> On Sat, 23 Aug 2014 16:26:43 +0200
> Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> > On Sat, Aug 23, 2014 at 02:05:47PM +0200, Thomas Zander wrote:
> > > with recent head of mplayer and ffmpeg I can't get it to display pgs
> > > subtitles anymore.
> > > While diff'ing tarballs with an older ffmpeg snapshot I have (from
> > > April) I noticed quite some changes in ffmpeg/libavcodec/pgssubdec.c.
> > > Replacing this one file in head with the revision from April helps,
> > > and pgs subtitles are displayed again as expected.
> > 
> > Thanks for the report.
> > 
> > > Now I am wondering. Is this due to an API change in ffmpeg that we did
> > > not accomodate in mplayer or simply a bug in ffmpeg?
> > 
> > More or less an API change.
> > They decided to use insanely large durations to signal "show subtitle
> > until it is explicitly erased".
> > MPlayer didn't know that and instead ended up with an integer overflow,
> > so it thought it should display it for 0 time.
> > Fixed in r37257.
> Which ffmpeg commit did this? Sounds like a huge load of crap. The
> right way to signal that a subtitle has an unknown duration is setting
> the duration field to 0 (unfortunately indistinguishable from a real
> duration of 0), and just setting a random huge duration is a bug.

Well, duration is the wrong expression, I don't think there is a
duration for subtitles, there is start/end_display_time, and
end_display_time is set to UINT_MAX.
Which actually a bit stupid, it previously was set to 20 seconds
which seems like a reasonable timeout, no idea why it was changed,
the patch is one big mess of completely unrelated changes in one thing.
See 253d0be6a1ecc343d29ff8e1df0ddf961ab9c772

More information about the MPlayer-users mailing list