player: rename a variable

Make it clear that this condition happens when switching to a new
timeline segment. It doesn't even need to coincide with a chapter.
This commit is contained in:
wm4 2014-07-30 23:26:17 +02:00
parent 1423bd0bfd
commit dacbaea1a8
1 changed files with 3 additions and 3 deletions

View File

@ -786,7 +786,7 @@ void run_playloop(struct MPContext *mpctx)
{ {
struct MPOpts *opts = mpctx->opts; struct MPOpts *opts = mpctx->opts;
double endpts = get_play_end_pts(mpctx); double endpts = get_play_end_pts(mpctx);
bool end_is_chapter = false; bool end_is_new_segment = false;
int64_t shown_vframes = mpctx->shown_vframes; int64_t shown_vframes = mpctx->shown_vframes;
#if HAVE_ENCODING #if HAVE_ENCODING
@ -801,8 +801,8 @@ void run_playloop(struct MPContext *mpctx)
if (mpctx->timeline) { if (mpctx->timeline) {
double end = mpctx->timeline[mpctx->timeline_part + 1].start; double end = mpctx->timeline[mpctx->timeline_part + 1].start;
if (endpts == MP_NOPTS_VALUE || end < endpts) { if (endpts == MP_NOPTS_VALUE || end < endpts) {
end_is_new_segment = true;
endpts = end; endpts = end;
end_is_chapter = true;
} }
} }
@ -876,7 +876,7 @@ void run_playloop(struct MPContext *mpctx)
mpctx->audio_status == STATUS_EOF && mpctx->audio_status == STATUS_EOF &&
mpctx->video_status == STATUS_EOF) mpctx->video_status == STATUS_EOF)
{ {
if (end_is_chapter) { if (end_is_new_segment) {
mp_seek(mpctx, (struct seek_params){ mp_seek(mpctx, (struct seek_params){
.type = MPSEEK_ABSOLUTE, .type = MPSEEK_ABSOLUTE,
.amount = mpctx->timeline[mpctx->timeline_part+1].start .amount = mpctx->timeline[mpctx->timeline_part+1].start