summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-23 00:45:23 +0200
committerwm4 <wm4@nowhere>2013-07-23 00:45:23 +0200
commite83cbde1a4b816a64cefde1fb8bdbac403079600 (patch)
tree1ac71b13723174ab48465915fd5e9916faa7df35
parent78ebb3c6fa637206bb369349ba93328b36895e2b (diff)
downloadmpv-e83cbde1a4b816a64cefde1fb8bdbac403079600.tar.bz2
mpv-e83cbde1a4b816a64cefde1fb8bdbac403079600.tar.xz
Fix some -Wshadow warnings
In general, this warning can hint to actual bugs. We don't enable it yet, because it would conflict with some unmerged code, and we should check with clang too (this commit was done by testing with gcc).
-rw-r--r--audio/filter/af.c4
-rw-r--r--audio/filter/af_lavcac3enc.c6
-rw-r--r--core/command.c6
-rw-r--r--core/input/input.c8
-rw-r--r--core/mplayer.c32
-rw-r--r--core/screenshot.c6
-rw-r--r--demux/demux_mkv.c15
-rw-r--r--demux/ebml.c7
-rw-r--r--demux/mf.c10
-rw-r--r--stream/stream_cdda.c5
-rw-r--r--stream/tv.c3
-rw-r--r--stream/tvi_v4l2.c5
-rw-r--r--sub/img_convert.c4
-rw-r--r--sub/sd_srt.c8
-rw-r--r--video/decode/vd_lavc.c8
-rw-r--r--video/filter/vf_down3dright.c8
-rw-r--r--video/filter/vf_hqdn3d.c4
-rw-r--r--video/filter/vf_lavfi.c2
-rw-r--r--video/filter/vf_phase.c2
-rw-r--r--video/filter/vf_scale.c8
-rw-r--r--video/filter/vf_softpulldown.c6
-rw-r--r--video/out/gl_lcms.c4
-rw-r--r--video/out/gl_video.c10
-rw-r--r--video/out/vo_opengl_old.c4
-rw-r--r--video/out/vo_sdl.c4
-rw-r--r--video/out/vo_vdpau.c3
26 files changed, 86 insertions, 96 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c
index 3737228ddf..91f3e907f1 100644
--- a/audio/filter/af.c
+++ b/audio/filter/af.c
@@ -204,9 +204,9 @@ static struct af_instance *af_create(struct af_stream *s, char *name,
goto error;
if (args && af->control) {
// Single option string for old filters
- char *s = (char *)args; // m_config_initialize_obj did this
+ char *opts = (char *)args; // m_config_initialize_obj did this
assert(!af->priv);
- if (af->control(af, AF_CONTROL_COMMAND_LINE, s) <= AF_ERROR)
+ if (af->control(af, AF_CONTROL_COMMAND_LINE, opts) <= AF_ERROR)
goto error;
}
diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c
index 7eacc01d81..5371f7aa7d 100644
--- a/audio/filter/af_lavcac3enc.c
+++ b/audio/filter/af_lavcac3enc.c
@@ -175,15 +175,15 @@ static void uninit(struct af_instance* af)
}
// Filter data through filter
-static struct mp_audio* play(struct af_instance* af, struct mp_audio* data)
+static struct mp_audio* play(struct af_instance* af, struct mp_audio* audio)
{
af_ac3enc_t *s = af->setup;
- struct mp_audio *c = data; // Current working data
+ struct mp_audio *c = audio; // Current working data
struct mp_audio *l;
int left, outsize = 0;
char *buf, *src;
int max_output_len;
- int frame_num = (data->len + s->pending_len) / s->expect_len;
+ int frame_num = (audio->len + s->pending_len) / s->expect_len;
int samplesize = af_fmt2bits(s->in_sampleformat) / 8;
if (s->add_iec61937_header)
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';
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 408e69390a..cc84565a60 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -734,9 +734,9 @@ static int demux_mkv_read_cues(demuxer_t *demuxer)
continue;
}
uint64_t time = cuepoint->cue_time;
- for (int i = 0; i < cuepoint->n_cue_track_positions; i++) {
+ for (int c = 0; c < cuepoint->n_cue_track_positions; c++) {
struct ebml_cue_track_positions *trackpos =
- &cuepoint->cue_track_positions[i];
+ &cuepoint->cue_track_positions[c];
uint64_t pos = mkv_d->segment_start + trackpos->cue_cluster_position;
cue_index_add(demuxer, trackpos->cue_track, pos, time);
mp_msg(MSGT_DEMUX, MSGL_DBG2,
@@ -853,9 +853,9 @@ static int demux_mkv_read_chapters(struct demuxer *demuxer)
memcpy(chapter.segment_uid, ca->chapter_segment_uid.start,
len);
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] Chapter segment uid ");
- for (int i = 0; i < len; i++)
+ for (int n = 0; n < len; n++)
mp_msg(MSGT_DEMUX, MSGL_V, "%02x ",
- chapter.segment_uid[i]);
+ chapter.segment_uid[n]);
mp_msg(MSGT_DEMUX, MSGL_V, "\n");
}
}
@@ -1979,16 +1979,15 @@ static void handle_realaudio(demuxer_t *demuxer, mkv_track_t *track,
|| (track->a_formattag == mmioFOURCC('s', 'i', 'p', 'r'))) {
// if(!block_bref)
// spc = track->sub_packet_cnt = 0;
- int x;
switch (track->a_formattag) {
case mmioFOURCC('2', '8', '_', '8'):
- for (x = 0; x < sph / 2; x++)
+ for (int x = 0; x < sph / 2; x++)
memcpy(track->audio_buf + x * 2 * w + spc * cfs,
buffer + cfs * x, cfs);
break;
case mmioFOURCC('c', 'o', 'o', 'k'):
case mmioFOURCC('a', 't', 'r', 'c'):
- for (x = 0; x < w / sps; x++)
+ for (int x = 0; x < w / sps; x++)
memcpy(track->audio_buf +
sps * (sph * x + ((sph + 1) / 2) * (spc & 1) +
(spc >> 1)), buffer + sps * x, sps);
@@ -2039,7 +2038,7 @@ static void handle_realaudio(demuxer_t *demuxer, mkv_track_t *track,
int apk_usize = track->stream->audio->wf->nBlockAlign;
track->sub_packet_cnt = 0;
// Release all the audio packets
- for (x = 0; x < sph * w / apk_usize; x++) {
+ for (int x = 0; x < sph * w / apk_usize; x++) {
dp = new_demux_packet_from(track->audio_buf + x * apk_usize,
apk_usize);
/* Put timestamp only on packets that correspond to original
diff --git a/demux/ebml.c b/demux/ebml.c
index 98ab1ef306..2314121f5e 100644
--- a/demux/ebml.c
+++ b/demux/ebml.c
@@ -459,12 +459,12 @@ static void ebml_parse_element(struct ebml_parse_ctx *ctx, void *target,
level, " ", type->name);
char *s = target;
- int len;
uint8_t *end = data + size;
uint8_t *p = data;
int num_elems[MAX_EBML_SUBELEMENTS] = {};
while (p < end) {
uint8_t *startp = p;
+ int len;
uint32_t id = ebml_parse_id(p, &len);
if (len > end - p)
goto past_end_error;
@@ -523,9 +523,8 @@ static void ebml_parse_element(struct ebml_parse_ctx *ctx, void *target,
case EBML_TYPE_SUBELEMENTS:
num_elems[i] = FFMIN(num_elems[i],
1000000000 / type->fields[i].desc->size);
- int size = num_elems[i] * type->fields[i].desc->size;
- *(generic_struct **) ptr = talloc_zero_size(ctx->talloc_ctx,
- size);
+ int sz = num_elems[i] * type->fields[i].desc->size;
+ *(generic_struct **) ptr = talloc_zero_size(ctx->talloc_ctx, sz);
break;
case EBML_TYPE_UINT:
*(uint64_t **) ptr = talloc_zero_array(ctx->talloc_ctx,
diff --git a/demux/mf.c b/demux/mf.c
index 21c3fad186..726bc8f394 100644
--- a/demux/mf.c
+++ b/demux/mf.c
@@ -96,20 +96,20 @@ mf_t* open_mf_pattern(char * filename)
{
bstr bfname;
bstr_split_tok(bfilename, ",", &bfname, &bfilename);
- char *fname = bstrdup0(NULL, bfname);
+ char *fname2 = bstrdup0(NULL, bfname);
- if ( !mp_path_exists( fname ) )
+ if ( !mp_path_exists( fname2 ) )
{
- mp_msg( MSGT_STREAM,MSGL_V,"[mf] file not found: '%s'\n",fname );
+ mp_msg( MSGT_STREAM,MSGL_V,"[mf] file not found: '%s'\n",fname2 );
}
else
{
mf->names=realloc( mf->names,( mf->nr_of_files + 1 ) * sizeof( char* ) );
- mf->names[mf->nr_of_files] = strdup(fname);
+ mf->names[mf->nr_of_files] = strdup(fname2);
// mp_msg( MSGT_STREAM,MSGL_V,"[mf] added file %d.: %s\n",mf->nr_of_files,mf->names[mf->nr_of_files] );
mf->nr_of_files++;
}
- talloc_free(fname);
+ talloc_free(fname2);
}
mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] number of files: %d\n",mf->nr_of_files );
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index 670f47e156..f245a6fe94 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -410,9 +410,8 @@ static int open_cdda(stream_t *st, int m, void *opts)
offset -= cdda_track_firstsector(cdd, 1);
if (offset) {
- int i;
- for (i = 0; i < cdd->tracks + 1; i++)
- cdd->disc_toc[i].dwStartSector += offset;
+ for (int n = 0; n < cdd->tracks + 1; n++)
+ cdd->disc_toc[n].dwStartSector += offset;
}
if (p->speed > 0)
diff --git a/stream/tv.c b/stream/tv.c
index 9b1f8024e4..79b70243fd 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -553,7 +553,6 @@ static int open_tv(tvi_handle_t *tvh)
tv_channel_last_real = malloc(5);
if (tv_channel_list) {
- int i;
int channel = 0;
if (tvh->tv_param->channel)
{
@@ -579,7 +578,7 @@ static int open_tv(tvi_handle_t *tvh)
if ( channel ) {
tv_channel_current = tv_channel_list;
- for (i = 1; i < channel; i++)
+ for (int n = 1; n < channel; n++)
if (tv_channel_current->next)
tv_channel_current = tv_channel_current->next;
}
diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c
index 06344d1fa9..e23ad1ea73 100644
--- a/stream/tvi_v4l2.c
+++ b/stream/tvi_v4l2.c
@@ -1103,9 +1103,8 @@ static int uninit(priv_t *priv)
free(priv->video_dev); priv->video_dev = NULL;
if (priv->video_ringbuffer) {
- int i;
- for (i = 0; i < priv->video_buffer_size_current; i++) {
- free(priv->video_ringbuffer[i].data);
+ for (int n = 0; n < priv->video_buffer_size_current; n++) {
+ free(priv->video_ringbuffer[n].data);
}
free(priv->video_ringbuffer);
}
diff --git a/sub/img_convert.c b/sub/img_convert.c
index 547f6aa265..9a5d1bf42b 100644
--- a/sub/img_convert.c
+++ b/sub/img_convert.c
@@ -242,8 +242,8 @@ bool osd_conv_ass_to_rgba(struct osd_conv_cache *c, struct sub_bitmaps *imgs)
memset_pic(bmp->bitmap, 0, bmp->w * 4, bmp->h, bmp->stride);
- for (int n = 0; n < src.num_parts; n++) {
- struct sub_bitmap *s = &src.parts[n];
+ for (int p = 0; p < src.num_parts; p++) {
+ struct sub_bitmap *s = &src.parts[p];
// Assume mp_get_sub_bb_list() never splits sub bitmaps
// So we don't clip/adjust the size of the sub bitmap
diff --git a/sub/sd_srt.c b/sub/sd_srt.c
index 31d2959e59..b01c4dc3f8 100644
--- a/sub/sd_srt.c
+++ b/sub/sd_srt.c
@@ -362,10 +362,10 @@ static void convert_subrip(const char *orig, char *dest, int dest_buffer_size)
for (int i = 0; i < FF_ARRAY_ELEMS(subrip_web_colors); i++) {
char *color = subrip_web_colors[i].s;
if (bstrcasecmp(val, bstr0(color)) == 0) {
- uint32_t color = subrip_web_colors[i].v;
- tag->color = ((color & 0xff) << 16)
- | (color & 0xff00)
- | ((color & 0xff0000) >> 16);
+ uint32_t xcolor = subrip_web_colors[i].v;
+ tag->color = ((xcolor & 0xff) << 16)
+ | (xcolor & 0xff00)
+ | ((xcolor & 0xff0000) >> 16);
found = 1;
}
}
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 978462fbe5..3ee1b40bb8 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -96,7 +96,7 @@ struct hwdec {
const char *codec, *hw_codec;
};
-static const struct hwdec hwdec[] = {
+static const struct hwdec hwdec_list[] = {
{HWDEC_VDPAU, "h264", "h264_vdpau"},
{HWDEC_VDPAU, "wmv3", "wmv3_vdpau"},
{HWDEC_VDPAU, "vc1", "vc1_vdpau"},
@@ -120,9 +120,9 @@ static const struct hwdec hwdec[] = {
static struct hwdec *find_hwcodec(enum hwdec_type api, const char *codec)
{
- for (int n = 0; hwdec[n].api; n++) {
- if (hwdec[n].api == api && strcmp(hwdec[n].codec, codec) == 0)
- return (struct hwdec *)&hwdec[n];
+ for (int n = 0; hwdec_list[n].api; n++) {
+ if (hwdec_list[n].api == api && strcmp(hwdec_list[n].codec, codec) == 0)
+ return (struct hwdec *)&hwdec_list[n];
}
return NULL;
}
diff --git a/video/filter/vf_down3dright.c b/video/filter/vf_down3dright.c
index 21616a4ad2..895753bafc 100644
--- a/video/filter/vf_down3dright.c
+++ b/video/filter/vf_down3dright.c
@@ -37,16 +37,16 @@ struct vf_priv_s {
int scaleh;
};
-static void toright(unsigned char *dst[3], unsigned char *src[3],
+static void toright(unsigned char *adst[3], unsigned char *asrc[3],
int dststride[3], int srcstride[3],
int w, int h, struct vf_priv_s* p)
{
int k;
for (k = 0; k < 3; k++) {
- unsigned char* fromL = src[k];
- unsigned char* fromR = src[k];
- unsigned char* to = dst[k];
+ unsigned char* fromL = asrc[k];
+ unsigned char* fromR = asrc[k];
+ unsigned char* to = adst[k];
int src = srcstride[k];
int dst = dststride[k];
int ss;
diff --git a/video/filter/vf_hqdn3d.c b/video/filter/vf_hqdn3d.c
index c5d99b2ace..8351707659 100644
--- a/video/filter/vf_hqdn3d.c
+++ b/video/filter/vf_hqdn3d.c
@@ -119,7 +119,6 @@ static void deNoiseSpacial(
}
for (Y = 1; Y < H; Y++){
- unsigned int PixelAnt;
sLineOffs += sStride, dLineOffs += dStride;
/* First pixel on each line doesn't have previous pixel */
PixelAnt = Frame[sLineOffs]<<16;
@@ -127,7 +126,6 @@ static void deNoiseSpacial(
FrameDest[dLineOffs]= ((PixelDst+0x10007FFF)>>16);
for (X = 1; X < W; X++){
- unsigned int PixelDst;
/* The rest are normal */
PixelAnt = LowPassMul(PixelAnt, Frame[sLineOffs+X]<<16, Horizontal);
PixelDst = LineAnt[X] = LowPassMul(LineAnt[X], PixelAnt, Vertical);
@@ -185,7 +183,6 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x]
}
for (Y = 1; Y < H; Y++){
- unsigned int PixelAnt;
unsigned short* LinePrev=&FrameAnt[Y*W];
sLineOffs += sStride, dLineOffs += dStride;
/* First pixel on each line doesn't have previous pixel */
@@ -196,7 +193,6 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x]
FrameDest[dLineOffs]= ((PixelDst+0x10007FFF)>>16);
for (X = 1; X < W; X++){
- unsigned int PixelDst;
/* The rest are normal */
PixelAnt = LowPassMul(PixelAnt, Frame[sLineOffs+X]<<16, Horizontal);
LineAnt[X] = LowPassMul(LineAnt[X], PixelAnt, Vertical);
diff --git a/video/filter/vf_lavfi.c b/video/filter/vf_lavfi.c
index d1e7a6e0cf..9cb731ae18 100644
--- a/video/filter/vf_lavfi.c
+++ b/video/filter/vf_lavfi.c
@@ -282,7 +282,7 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *mpi)
av_frame_free(&frame);
for (;;) {
- AVFrame *frame = av_frame_alloc();
+ frame = av_frame_alloc();
if (av_buffersink_get_frame(p->out, frame) < 0) {
// Not an error situation - no more output buffers in queue.
av_frame_free(&frame);
diff --git a/video/filter/vf_phase.c b/video/filter/vf_phase.c
index 0b31ede5e5..5754b5f2c7 100644
--- a/video/filter/vf_phase.c
+++ b/video/filter/vf_phase.c
@@ -86,7 +86,7 @@ static void do_plane(unsigned char *to, unsigned char *from,
static enum mode analyze_plane(unsigned char *old, unsigned char *new,
int w, int h, int os, int ns, enum mode mode,
- int verbose, int fields)
+ int unused, int fields)
{
double bdiff, pdiff, tdiff, scale;
int bdif, tdif, pdif;
diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c
index 738487f7d8..35c9e3cbae 100644
--- a/video/filter/vf_scale.c
+++ b/video/filter/vf_scale.c
@@ -203,15 +203,15 @@ static unsigned int find_best_out(vf_instance_t *vf, int in_format)
}
if (!best) {
// Try anything else. outfmt_list is just a list of preferred formats.
- for (int format = IMGFMT_START; format < IMGFMT_END; format++) {
- int ret = check_outfmt(vf, format);
+ for (int cur = IMGFMT_START; cur < IMGFMT_END; cur++) {
+ int ret = check_outfmt(vf, cur);
if (ret & VFCAP_CSP_SUPPORTED_BY_HW) {
- best = format; // no conversion -> bingo!
+ best = cur; // no conversion -> bingo!
break;
}
if (ret & VFCAP_CSP_SUPPORTED && !best)
- best = format; // best with conversion
+ best = cur; // best with conversion
}
}
return best;
diff --git a/video/filter/vf_softpulldown.c b/video/filter/vf_softpulldown.c
index 9fd75a0ba0..02a1158d5d 100644
--- a/video/filter/vf_softpulldown.c
+++ b/video/filter/vf_softpulldown.c
@@ -95,9 +95,9 @@ static int filter(struct vf_instance *vf, struct mp_image *mpi)
vf_add_output_frame(vf, new);
vf->priv->out++;
if (flags & MP_IMGFIELD_REPEAT_FIRST) {
- struct mp_image *new = mp_image_new_ref(mpi);
- new->pts = vf_softpulldown_adjust_pts(&vf->priv->ptsbuf, mpi->pts, 0, 0, 3);
- vf_add_output_frame(vf, new);
+ struct mp_image *new2 = mp_image_new_ref(mpi);
+ new2->pts = vf_softpulldown_adjust_pts(&vf->priv->ptsbuf, mpi->pts, 0, 0, 3);
+ vf_add_output_frame(vf, new2);
vf->priv->out++;
vf->priv->state=0;
} else {
diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c
index f7e418f1d1..fdab119fb1 100644
--- a/video/out/gl_lcms.c
+++ b/video/out/gl_lcms.c
@@ -39,9 +39,9 @@
#include <lcms2.h>
-static bool parse_3dlut_size(const char *s, int *p1, int *p2, int *p3)
+static bool parse_3dlut_size(const char *arg, int *p1, int *p2, int *p3)
{
- if (sscanf(s, "%dx%dx%d", p1, p2, p3) != 3)
+ if (sscanf(arg, "%dx%dx%d", p1, p2, p3) != 3)
return false;
for (int n = 0; n < 3; n++) {
int s = ((int[]) { *p1, *p2, *p3 })[n];
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 98862b92e7..bb99d769b4 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -1592,7 +1592,7 @@ static void draw_osd_cb(void *ctx, struct mpgl_osd_part *osd,
for (int n = 0; n < osd->packer->count; n++) {
struct sub_bitmap *b = &imgs->parts[n];
- struct pos p = osd->packer->result[n];
+ struct pos pos = osd->packer->result[n];
// NOTE: the blend color is used with SUBBITMAP_LIBASS only, so it
// doesn't matter that we upload garbage for the other formats
@@ -1602,7 +1602,7 @@ static void draw_osd_cb(void *ctx, struct mpgl_osd_part *osd,
write_quad(&va[osd->num_vertices],
b->x, b->y, b->x + b->dw, b->y + b->dh,
- p.x, p.y, p.x + b->w, p.y + b->h,
+ pos.x, pos.y, pos.x + b->w, pos.y + b->h,
osd->w, osd->h, color, false);
osd->num_vertices += VERTICES_PER_QUAD;
}
@@ -1657,12 +1657,12 @@ static bool test_fbo(struct gl_video *p, GLenum format)
gl->BindFramebuffer(GL_FRAMEBUFFER, fbo.fbo);
gl->ReadBuffer(GL_COLOR_ATTACHMENT0);
for (int i = 0; i < 4; i++) {
- float p = -1;
+ float pixel = -1;
float val = vals[i];
gl->ClearColor(val, 0.0f, 0.0f, 1.0f);
gl->Clear(GL_COLOR_BUFFER_BIT);
- gl->ReadPixels(0, 0, 1, 1, GL_RED, GL_FLOAT, &p);
- mp_msg(MSGT_VO, MSGL_V, " %s: %a\n", val_names[i], val - p);
+ gl->ReadPixels(0, 0, 1, 1, GL_RED, GL_FLOAT, &pixel);
+ mp_msg(MSGT_VO, MSGL_V, " %s: %a\n", val_names[i], val - pixel);
}
gl->BindFramebuffer(GL_FRAMEBUFFER, 0);
glCheckError(gl, "after FBO read");
diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c
index 2caf0c3f28..1e8fba6495 100644
--- a/video/out/vo_opengl_old.c
+++ b/video/out/vo_opengl_old.c
@@ -1832,8 +1832,8 @@ static bool get_image(struct vo *vo, mp_image_t *mpi, int *th, bool *cplane)
height = p->texture_height;
}
int avgbpp16 = 0;
- for (int p = 0; p < 4; p++)
- avgbpp16 += (16 * mpi->fmt.bpp[p]) >> mpi->fmt.xs[p] >> mpi->fmt.ys[p];
+ for (int pl = 0; pl < 4; pl++)
+ avgbpp16 += (16 * mpi->fmt.bpp[pl]) >> mpi->fmt.xs[pl] >> mpi->fmt.ys[pl];
int avgbpp = avgbpp16 / 16;
mpi->stride[0] = width * avgbpp / 8;
needed_size = mpi->stride[0] * height;
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c
index c5ecc2be8c..6b8b393984 100644
--- a/video/out/vo_sdl.c
+++ b/video/out/vo_sdl.c
@@ -721,11 +721,11 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
{
struct priv *vc = vo->priv;
- static const bool formats[SUBBITMAP_COUNT] = {
+ static const bool osdformats[SUBBITMAP_COUNT] = {
[SUBBITMAP_RGBA] = true,
};
- osd_draw(osd, vc->osd_res, osd->vo_pts, 0, formats, draw_osd_cb, vo);
+ osd_draw(osd, vc->osd_res, osd->vo_pts, 0, osdformats, draw_osd_cb, vo);
}
static int preinit(struct vo *vo)
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 85ad4ecf80..6f1483cdd9 100644
--- a/video/out/vo_vdpau.c
+++ b/video