1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

fftools/ffmpeg_enc: Reindentate after the last commit

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2023-07-16 16:13:05 +02:00
parent bfe15b81b3
commit 463a472426

View File

@@ -304,31 +304,31 @@ int enc_open(OutputStream *ost, AVFrame *frame)
enc_ctx->bits_per_raw_sample = FFMIN(fd->bits_per_raw_sample, enc_ctx->bits_per_raw_sample = FFMIN(fd->bits_per_raw_sample,
av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth); av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth);
enc_ctx->color_range = frame->color_range; enc_ctx->color_range = frame->color_range;
enc_ctx->color_primaries = frame->color_primaries; enc_ctx->color_primaries = frame->color_primaries;
enc_ctx->color_trc = frame->color_trc; enc_ctx->color_trc = frame->color_trc;
enc_ctx->colorspace = frame->colorspace; enc_ctx->colorspace = frame->colorspace;
enc_ctx->chroma_sample_location = frame->chroma_location; enc_ctx->chroma_sample_location = frame->chroma_location;
enc_ctx->framerate = fr; enc_ctx->framerate = fr;
ost->st->avg_frame_rate = fr; ost->st->avg_frame_rate = fr;
// Field order: autodetection // Field order: autodetection
if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) && if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) &&
ost->top_field_first >= 0) ost->top_field_first >= 0)
if (ost->top_field_first) if (ost->top_field_first)
frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
else else
frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
if (frame->flags & AV_FRAME_FLAG_INTERLACED) { if (frame->flags & AV_FRAME_FLAG_INTERLACED) {
if (enc->id == AV_CODEC_ID_MJPEG) if (enc->id == AV_CODEC_ID_MJPEG)
enc_ctx->field_order = (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? AV_FIELD_TT:AV_FIELD_BB; enc_ctx->field_order = (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? AV_FIELD_TT:AV_FIELD_BB;
else else
enc_ctx->field_order = (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? AV_FIELD_TB:AV_FIELD_BT; enc_ctx->field_order = (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? AV_FIELD_TB:AV_FIELD_BT;
} else } else
enc_ctx->field_order = AV_FIELD_PROGRESSIVE; enc_ctx->field_order = AV_FIELD_PROGRESSIVE;
// Field order: override // Field order: override
if (ost->top_field_first == 0) { if (ost->top_field_first == 0) {