From 796426819c0dfb41666a39e94dca78db20d69ee9 Mon Sep 17 00:00:00 2001
From: Adriano Pallavicino <adriano.pallavicino@gmail.com>
Date: Tue, 1 Nov 2016 13:42:27 +0100
Subject: [PATCH] Fix build warnings due to misleading indentation
Signed-off-by: Adriano Pallavicino <adriano.pallavicino@gmail.com>
Changes to be committed:
modified: libavcodec/mpegvideo.c
modified: libavfilter/vf_paletteuse.c
modified: libavformat/matroskaenc.c
---
libavcodec/mpegvideo.c | 54 ++++++++++++++++++++++-----------------------
libavfilter/vf_paletteuse.c | 2 +-
libavformat/matroskaenc.c | 20 ++++++++---------
3 files changed, 38 insertions(+), 38 deletions(-)
@@ -940,37 +940,37 @@ av_cold int ff_mpv_common_init(MpegEncContext *s)
if (!s->new_picture.f)
goto fail;
- if (init_context_frame(s))
- goto fail;
+ if (init_context_frame(s))
+ goto fail;
- s->parse_context.state = -1;
+ s->parse_context.state = -1;
- s->context_initialized = 1;
- memset(s->thread_context, 0, sizeof(s->thread_context));
- s->thread_context[0] = s;
+ s->context_initialized = 1;
+ memset(s->thread_context, 0, sizeof(s->thread_context));
+ s->thread_context[0] = s;
// if (s->width && s->height) {
- if (nb_slices > 1) {
- for (i = 0; i < nb_slices; i++) {
- if (i) {
- s->thread_context[i] = av_memdup(s, sizeof(MpegEncContext));
- if (!s->thread_context[i])
- goto fail;
- }
- if (init_duplicate_context(s->thread_context[i]) < 0)
+ if (nb_slices > 1) {
+ for (i = 0; i < nb_slices; i++) {
+ if (i) {
+ s->thread_context[i] = av_memdup(s, sizeof(MpegEncContext));
+ if (!s->thread_context[i])
goto fail;
- s->thread_context[i]->start_mb_y =
- (s->mb_height * (i) + nb_slices / 2) / nb_slices;
- s->thread_context[i]->end_mb_y =
- (s->mb_height * (i + 1) + nb_slices / 2) / nb_slices;
}
- } else {
- if (init_duplicate_context(s) < 0)
+ if (init_duplicate_context(s->thread_context[i]) < 0)
goto fail;
- s->start_mb_y = 0;
- s->end_mb_y = s->mb_height;
+ s->thread_context[i]->start_mb_y =
+ (s->mb_height * (i) + nb_slices / 2) / nb_slices;
+ s->thread_context[i]->end_mb_y =
+ (s->mb_height * (i + 1) + nb_slices / 2) / nb_slices;
}
- s->slice_context_count = nb_slices;
+ } else {
+ if (init_duplicate_context(s) < 0)
+ goto fail;
+ s->start_mb_y = 0;
+ s->end_mb_y = s->mb_height;
+ }
+ s->slice_context_count = nb_slices;
// }
return 0;
@@ -1090,10 +1090,10 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s)
}
if ((err = init_duplicate_context(s->thread_context[i])) < 0)
goto fail;
- s->thread_context[i]->start_mb_y =
- (s->mb_height * (i) + nb_slices / 2) / nb_slices;
- s->thread_context[i]->end_mb_y =
- (s->mb_height * (i + 1) + nb_slices / 2) / nb_slices;
+ s->thread_context[i]->start_mb_y =
+ (s->mb_height * (i) + nb_slices / 2) / nb_slices;
+ s->thread_context[i]->end_mb_y =
+ (s->mb_height * (i + 1) + nb_slices / 2) / nb_slices;
}
} else {
err = init_duplicate_context(s);
@@ -444,7 +444,7 @@ static av_always_inline int set_frame(PaletteUseContext *s, AVFrame *out, AVFram
if (down) {
if (left2) src[ src_linesize + x - 2] = dither_color(src[ src_linesize + x - 2], er, eg, eb, 1, 4);
if (left) src[ src_linesize + x - 1] = dither_color(src[ src_linesize + x - 1], er, eg, eb, 2, 4);
- src[ src_linesize + x ] = dither_color(src[ src_linesize + x ], er, eg, eb, 3, 4);
+ src[ src_linesize + x ] = dither_color(src[ src_linesize + x ], er, eg, eb, 3, 4);
if (right) src[ src_linesize + x + 1] = dither_color(src[ src_linesize + x + 1], er, eg, eb, 2, 4);
if (right2) src[ src_linesize + x + 2] = dither_color(src[ src_linesize + x + 2], er, eg, eb, 1, 4);
}
@@ -755,16 +755,16 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb,
if (!par->codec_tag)
par->codec_tag = ff_codec_get_tag(ff_codec_movvideo_tags,
par->codec_id);
- if ( ff_codec_get_id(ff_codec_movvideo_tags, par->codec_tag) == par->codec_id
- && (!par->extradata_size || ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(par->extradata + 4)) != par->codec_id)
- ) {
- int i;
- avio_wb32(dyn_cp, 0x5a + par->extradata_size);
- avio_wl32(dyn_cp, par->codec_tag);
- for(i = 0; i < 0x5a - 8; i++)
- avio_w8(dyn_cp, 0);
- }
- avio_write(dyn_cp, par->extradata, par->extradata_size);
+ if ( ff_codec_get_id(ff_codec_movvideo_tags, par->codec_tag) == par->codec_id
+ && (!par->extradata_size || ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(par->extradata + 4)) != par->codec_id)
+ ) {
+ int i;
+ avio_wb32(dyn_cp, 0x5a + par->extradata_size);
+ avio_wl32(dyn_cp, par->codec_tag);
+ for(i = 0; i < 0x5a - 8; i++)
+ avio_w8(dyn_cp, 0);
+ }
+ avio_write(dyn_cp, par->extradata, par->extradata_size);
} else {
if (!ff_codec_get_tag(ff_codec_bmp_tags, par->codec_id))
av_log(s, AV_LOG_WARNING, "codec %s is not supported by this format\n",
--
2.7.4