diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:51:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:55:15 +0300 |
commit | d8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch) | |
tree | 0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/imbuf | |
parent | 8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff) |
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 9 | ||||
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 3 | ||||
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 3 | ||||
-rw-r--r-- | source/blender/imbuf/intern/util.c | 3 |
4 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index fe24ccc99a9..d518406124f 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -625,18 +625,21 @@ size_t IMB_get_size_in_memory(ImBuf *ibuf) size += sizeof(ImBuf); - if (ibuf->rect) + if (ibuf->rect) { channel_size += sizeof(char); + } - if (ibuf->rect_float) + if (ibuf->rect_float) { channel_size += sizeof(float); + } size += channel_size * ibuf->x * ibuf->y * ibuf->channels; if (ibuf->miptot) { for (a = 0; a < ibuf->miptot; a++) { - if (ibuf->mipmap[a]) + if (ibuf->mipmap[a]) { size += IMB_get_size_in_memory(ibuf->mipmap[a]); + } } } diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 483ccc9ea9d..11d2cb54ec5 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -530,7 +530,7 @@ static int startffmpeg(struct anim *anim) /* Find the video stream */ videoStream = -1; - for (i = 0; i < pFormatCtx->nb_streams; i++) + for (i = 0; i < pFormatCtx->nb_streams; i++) { if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { if (streamcount > 0) { streamcount--; @@ -539,6 +539,7 @@ static int startffmpeg(struct anim *anim) videoStream = i; break; } + } if (videoStream == -1) { avformat_close_input(&pFormatCtx); diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index e343faa7dc8..dd31dafd148 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -742,7 +742,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, /* Find the video stream */ context->videoStream = -1; - for (i = 0; i < context->iFormatCtx->nb_streams; i++) + for (i = 0; i < context->iFormatCtx->nb_streams; i++) { if (context->iFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { if (streamcount > 0) { streamcount--; @@ -751,6 +751,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, context->videoStream = i; break; } + } if (context->videoStream == -1) { avformat_close_input(&context->iFormatCtx); diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 1126a93148d..ff7cb87960e 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -285,12 +285,13 @@ static int isffmpeg(const char *filename) /* Find the first video stream */ videoStream = -1; - for (i = 0; i < pFormatCtx->nb_streams; i++) + for (i = 0; i < pFormatCtx->nb_streams; i++) { if (pFormatCtx->streams[i] && pFormatCtx->streams[i]->codec && (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)) { videoStream = i; break; } + } if (videoStream == -1) { avformat_close_input(&pFormatCtx); |