[MPlayer-dev-eng] [PATCH] add -endpos support in mplayer too::2nd try

Paul TT paultt at hackerjournal.it
Thu Nov 17 19:05:47 CET 2005


refitted to cvs of 20051117... :-)

i think i will commit in a few days if noone complains....
the discussion below about endpos relative to -ss made me think about a
'correction' to ss code, instead to the one related to endpos.
i think i'll do, but later on:-)

---

the patch adds support for -endpos option in mplayer.
added also modifications for mplayer.1 man page

the only problem is the computation of the end time if used in
conjunction with -ss option (in secs):
acting this way:

mplayer -ss 3 -endpos 12 file.avi

starts at second 3 and ends at sec 15 (abs time of clip).
and this is good.
but for some files/formats, the playing doesn't start indeed at second 3
but  maybe at second 8. in this situation i stop anyway at sec 15.

i think it could be good in this way too, since if i want to play
exactly 15 sec i should calculate number of frames.

but: is it good indeed or not??
and if not, has someone an idea about the possibility to track the
'real' start time (that (in)famous 8 in the example above)?????

thanx, PaulTT

NOTE it does not implement endpos at byte position , since it seems
unuseful, but maybe one day or another, or someone else... ;-)

NOTE2: there should be, now or then, by me or by someone else, an effort
to move parse_at_end function in a place shared by both mplayer and
mencoder. when the patch will be applied, i'll do the task...

NOTE3: don't know if i have put the code to stop decoding for the cas in
which only audio is present. i can have missed the right place. if so
correct me :-)

......

NOTE for Mustafa Abbasi: since you proposed yrself in users ml, i cc'ed
the patch to you too, applies at this time's cvs version :-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mplayer_endpos6.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20051117/7ccefd56/attachment.txt>


More information about the MPlayer-dev-eng mailing list