diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/command.c | 6 | ||||
-rw-r--r-- | core/input/input.c | 8 | ||||
-rw-r--r-- | core/mplayer.c | 32 | ||||
-rw-r--r-- | core/screenshot.c | 6 |
4 files changed, 26 insertions, 26 deletions
diff --git a/core/command.c b/core/command.c index 32479784e9..8d574242a2 100644 --- a/core/command.c +++ b/core/command.c @@ -499,8 +499,8 @@ static int mp_property_quvi_format(m_option_t *prop, int action, void *arg, pos = av_clip(pos, 0, res->num_srcs); } } - char *arg = res->srcs[pos]->encid; - return mp_property_quvi_format(prop, M_PROPERTY_SET, &arg, mpctx); + char *fmt = res->srcs[pos]->encid; + return mp_property_quvi_format(prop, M_PROPERTY_SET, &fmt, mpctx); } } return mp_property_generic_option(prop, action, arg, mpctx); @@ -916,7 +916,7 @@ static const char *track_type_name(enum stream_type t) } static int property_list_tracks(m_option_t *prop, int action, void *arg, - MPContext *mpctx, enum stream_type type) + MPContext *mpctx) { if (action == M_PROPERTY_GET) { char *res = NULL; diff --git a/core/input/input.c b/core/input/input.c index 467f6d6299..183cec7f09 100644 --- a/core/input/input.c +++ b/core/input/input.c @@ -559,7 +559,7 @@ static int print_cmd_list(m_option_t *cfg, char *optname, char *optparam); #define OPT_BASE_STRUCT struct MPOpts // Our command line options -static const m_option_t input_conf[] = { +static const m_option_t input_config[] = { OPT_STRING("conf", input.config_file, CONF_GLOBAL), OPT_INT("ar-delay", input.ar_delay, CONF_GLOBAL), OPT_INT("ar-rate", input.ar_rate, CONF_GLOBAL), @@ -573,7 +573,7 @@ static const m_option_t input_conf[] = { }; static const m_option_t mp_input_opts[] = { - { "input", (void *)&input_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, + { "input", (void *)&input_config, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, OPT_INTRANGE("doubleclick-time", input.doubleclick_time, 0, 0, 1000), OPT_FLAG("joystick", input.use_joystick, CONF_GLOBAL), OPT_FLAG("lirc", input.use_lirc, CONF_GLOBAL), @@ -1260,8 +1260,8 @@ static struct cmd_bind *find_any_bind_for_key(struct input_ctx *ictx, struct cmd_bind *bind = find_bind_for_key_section(ictx, s->name, n, keys); if (bind) { struct cmd_bind_section *bs = bind->owner; - for (int i = 0; i < n; i++) { - if (MP_KEY_DEPENDS_ON_MOUSE_POS(keys[i]) && bs->mouse_area_set && + for (int x = 0; x < n; x++) { + if (MP_KEY_DEPENDS_ON_MOUSE_POS(keys[x]) && bs->mouse_area_set && !test_rect(&bs->mouse_area, ictx->mouse_vo_x, ictx->mouse_vo_y)) goto skip; } diff --git a/core/mplayer.c b/core/mplayer.c index a71beb54b0..3e3f5f5907 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -850,11 +850,11 @@ void mp_write_watch_later_conf(struct MPContext *mpctx) fprintf(file, "start=%f\n", pos); for (int i = 0; backup_properties[i]; i++) { const char *pname = backup_properties[i]; - char *tmp = NULL; - int r = mp_property_do(pname, M_PROPERTY_GET_STRING, &tmp, mpctx); + char *val = NULL; + int r = mp_property_do(pname, M_PROPERTY_GET_STRING, &val, mpctx); if (r == M_PROPERTY_OK) - fprintf(file, "%s=%s\n", pname, tmp); - talloc_free(tmp); + fprintf(file, "%s=%s\n", pname, val); + talloc_free(val); } fclose(file); @@ -2135,7 +2135,7 @@ static int audio_start_sync(struct MPContext *mpctx, int playsize) if (written_pts <= 1 && sh_audio->pts == MP_NOPTS_VALUE) { if (!did_retry) { // Try to read more data to see packets that have pts - int res = decode_audio(sh_audio, &ao->buffer, ao->bps); + res = decode_audio(sh_audio, &ao->buffer, ao->bps); if (res < 0) return res; did_retry = true; @@ -2152,7 +2152,7 @@ static int audio_start_sync(struct MPContext *mpctx, int playsize) mpctx->syncing_audio = false; int a = FFMIN(-bytes, FFMAX(playsize, 20000)); - int res = decode_audio(sh_audio, &ao->buffer, a); + res = decode_audio(sh_audio, &ao->buffer, a); bytes += ao->buffer.len; if (bytes >= 0) { memmove(ao->buffer.start, @@ -2838,8 +2838,8 @@ static bool timeline_set_part(struct MPContext *mpctx, int i, bool force) // While another timeline was active, the selection of active tracks might // have been changed - possibly we need to update this source. - for (int n = 0; n < mpctx->num_tracks; n++) { - struct track *track = mpctx->tracks[n]; + for (int x = 0; x < mpctx->num_tracks; x++) { + struct track *track = mpctx->tracks[x]; if (track->under_timeline) { track->demuxer = mpctx->demuxer; track->stream = demuxer_stream_by_demuxer_id(track->demuxer, @@ -3127,11 +3127,11 @@ double get_current_pos_ratio(struct MPContext *mpctx, bool use_range) if (len > 0 && !demuxer->ts_resets_possible) { ans = av_clipf((pos - start) / len, 0, 1); } else { - int len = (demuxer->movi_end - demuxer->movi_start); - int64_t pos = demuxer->filepos > 0 ? - demuxer->filepos : stream_tell(demuxer->stream); - if (len > 0) - ans = av_clipf((double)(pos - demuxer->movi_start) / len, 0, 1); + int64_t size = (demuxer->movi_end - demuxer->movi_start); + int64_t fpos = demuxer->filepos > 0 ? + demuxer->filepos : stream_tell(demuxer->stream); + if (size > 0) + ans = av_clipf((double)(fpos - demuxer->movi_start) / size, 0, 1); } if (use_range) { if (mpctx->opts.play_frames > 0) @@ -3936,9 +3936,9 @@ static struct track *open_external_file(struct MPContext *mpctx, char *filename, } struct track *first = NULL; for (int n = 0; n < demuxer->num_streams; n++) { - struct sh_stream *stream = demuxer->streams[n]; - if (stream->type == filter) { - struct track *t = add_stream_track(mpctx, stream, false); + struct sh_stream *sh = demuxer->streams[n]; + if (sh->type == filter) { + struct track *t = add_stream_track(mpctx, sh, false); t->is_external = true; t->title = talloc_strdup(t, disp_filename); t->external_filename = talloc_strdup(t, filename); diff --git a/core/screenshot.c b/core/screenshot.c index 6b07bce5a0..ee568d4b3d 100644 --- a/core/screenshot.c +++ b/core/screenshot.c @@ -187,11 +187,11 @@ static char *create_fname(struct MPContext *mpctx, char *template, break; } case 't': { - char fmt = *template; - if (!fmt) + char tfmt = *template; + if (!tfmt) goto error_exit; template++; - char fmtstr[] = {'%', fmt, '\0'}; + char fmtstr[] = {'%', tfmt, '\0'}; char buffer[80]; if (strftime(buffer, sizeof(buffer), fmtstr, local_time) == 0) buffer[0] = '\0'; |