Skip to content

Commit

Permalink
player: cosmetics: rename a function
Browse files Browse the repository at this point in the history
Something which has this many important sideffects shouldn't start have
a "get" prefix.
  • Loading branch information
wm4 committed Dec 27, 2014
1 parent 069016f commit 6659de7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion player/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
if (!mpctx->num_sources)
return -1;
struct osd_sub_state state;
get_osd_sub_state(mpctx, 0, &state);
update_osd_sub_state(mpctx, 0, &state);
double refpts = get_current_time(mpctx);
if (state.dec_sub && refpts != MP_NOPTS_VALUE) {
double a[2];
Expand Down
4 changes: 2 additions & 2 deletions player/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ void uninit_sub_all(struct MPContext *mpctx);
void update_osd_msg(struct MPContext *mpctx);
void update_subtitles(struct MPContext *mpctx);
void uninit_sub_renderer(struct MPContext *mpctx);
void get_osd_sub_state(struct MPContext *mpctx, int order,
struct osd_sub_state *out_state);
void update_osd_sub_state(struct MPContext *mpctx, int order,
struct osd_sub_state *out_state);

// timeline/tl_matroska.c
void build_ordered_chapter_timeline(struct MPContext *mpctx);
Expand Down
8 changes: 4 additions & 4 deletions player/sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ static bool is_interleaved(struct MPContext *mpctx, struct track *track)
return track->demuxer == mpctx->demuxer;
}

void get_osd_sub_state(struct MPContext *mpctx, int order,
struct osd_sub_state *out_state)
void update_osd_sub_state(struct MPContext *mpctx, int order,
struct osd_sub_state *out_state)
{
struct MPOpts *opts = mpctx->opts;
struct track *track = mpctx->current_track[order][STREAM_SUB];
Expand Down Expand Up @@ -237,7 +237,7 @@ static void update_subtitle(struct MPContext *mpctx, int order)
}

struct osd_sub_state state;
get_osd_sub_state(mpctx, order, &state);
update_osd_sub_state(mpctx, order, &state);

double refpts_s = mpctx->playback_pts - state.video_offset;
double curpts_s = refpts_s - opts->sub_delay;
Expand Down Expand Up @@ -341,5 +341,5 @@ void reinit_subs(struct MPContext *mpctx, int order)
struct dec_sub *dec_sub = mpctx->d_sub[order];
reinit_subdec(mpctx, track, dec_sub);

get_osd_sub_state(mpctx, order, NULL);
update_osd_sub_state(mpctx, order, NULL);
}

0 comments on commit 6659de7

Please sign in to comment.