0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

mplayer: make --length work if --start is missing

In this case, --start should default to 0 obviously.
This commit is contained in:
wm4 2012-12-08 23:30:59 +01:00
parent 180944fe28
commit ae9c03c1a9

View File

@ -284,7 +284,7 @@ static double get_play_end_pts(struct MPContext *mpctx)
if (opts->play_end.type) {
return rel_time_to_abs(mpctx, opts->play_end, MP_NOPTS_VALUE);
} else if (opts->play_length.type) {
double start = rel_time_to_abs(mpctx, opts->play_start, -1);
double start = rel_time_to_abs(mpctx, opts->play_start, 0);
double length = rel_time_to_abs(mpctx, opts->play_length, -1);
if (start != -1 && length != -1)
return start + length;