summaryrefslogtreecommitdiff
path: root/libavcodec/encode.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-01-20 16:53:18 +0100
committerAnton Khirnov <anton@khirnov.net>2022-04-13 12:48:18 +0200
commitee26138e67fb01a0d95966ee7d143e7361057fb0 (patch)
tree3489251b9a18f083b71bc01e2d4674fdfa8fab44 /libavcodec/encode.c
parent15975881ae183fede130871e1af497ae4f870150 (diff)
downloadffmpeg-ee26138e67fb01a0d95966ee7d143e7361057fb0.tar.gz
lavc/encode: reindent
Diffstat (limited to 'libavcodec/encode.c')
-rw-r--r--libavcodec/encode.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 05fa34d6c5..85b8e089dd 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -411,7 +411,7 @@ int attribute_align_arg avcodec_receive_packet(AVCodecContext *avctx, AVPacket *
static int encode_preinit_video(AVCodecContext *avctx)
{
- const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(avctx->pix_fmt);
+ const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(avctx->pix_fmt);
int i;
if (avctx->codec->pix_fmts) {
@@ -433,16 +433,16 @@ static int encode_preinit_video(AVCodecContext *avctx)
avctx->color_range = AVCOL_RANGE_JPEG;
}
- if ( avctx->bits_per_raw_sample < 0
- || (avctx->bits_per_raw_sample > 8 && pixdesc->comp[0].depth <= 8)) {
- av_log(avctx, AV_LOG_WARNING, "Specified bit depth %d not possible with the specified pixel formats depth %d\n",
- avctx->bits_per_raw_sample, pixdesc->comp[0].depth);
- avctx->bits_per_raw_sample = pixdesc->comp[0].depth;
- }
- if (avctx->width <= 0 || avctx->height <= 0) {
- av_log(avctx, AV_LOG_ERROR, "dimensions not set\n");
- return AVERROR(EINVAL);
- }
+ if ( avctx->bits_per_raw_sample < 0
+ || (avctx->bits_per_raw_sample > 8 && pixdesc->comp[0].depth <= 8)) {
+ av_log(avctx, AV_LOG_WARNING, "Specified bit depth %d not possible with the specified pixel formats depth %d\n",
+ avctx->bits_per_raw_sample, pixdesc->comp[0].depth);
+ avctx->bits_per_raw_sample = pixdesc->comp[0].depth;
+ }
+ if (avctx->width <= 0 || avctx->height <= 0) {
+ av_log(avctx, AV_LOG_ERROR, "dimensions not set\n");
+ return AVERROR(EINVAL);
+ }
if (avctx->ticks_per_frame && avctx->time_base.num &&
avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) {