[MPlayer-dev-eng] [PATCH] refresh end_pos in stream_file.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat May 31 15:09:11 CEST 2014


On Tue, May 20, 2014 at 01:39:19PM -0700, Scott W. Larson wrote:
> On 05/20/2014 01:03 PM, Reimar Döffinger wrote:
> >This came up before: It should not be necessary. The end_pos will be
> >ignored/updated if we do not actually reach EOF at that point.
> 
> The OSD will show that you've reached EOF which is misleading if the file
> has grown since mplayer has started.

These are quite different issues, with completely different solutions.
For the case where it doesn't actually play past the original file size,
the solution is to simply double-check once the endpos is reached (or
rather, just never use it except as a hint at all).
That is advisable in general since with streams it can happen that the original
size indication isn't right anyway.
The OSD on the other hand is completely different.
For example it will only affect certain demuxers, in combination with
certain stream types.
These demuxers do have the issue that their time estimate is complete
nonsense anyway.
So for example, the MOV, MKV, ... demuxers are not affected.
Even the TS demuxer is not affected when it is used as part of playing
Bluray media.
In addition, since it is only for the OSD it is not a good idea to
update it on every read - updating maybe once per second should be
enough.
For the -PS demuxer it would require even more work, since that one
uses endpos to find and estimate the final time stamp, and thus get
the length.
Just updating endpos won't help one bit.
So while making the OSD work properly in this case would be nice,
a good solution isn't easy and it doesn't seem all that important to.
If someone wants to work on it I'll be happy to help out, but I'm fairly
certain it won't be done on one afternoon or so.


More information about the MPlayer-dev-eng mailing list