[FFmpeg-cvslog] fftools/ffmpeg_enc: reindent after previous commit
Anton Khirnov
git at videolan.org
Wed Aug 30 13:00:13 EEST 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Jul 21 15:22:57 2023 +0200| [8b6b2518faf6fab23f9993498e71ab4fa1f1b812] | committer: Anton Khirnov
fftools/ffmpeg_enc: reindent after previous commit
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b6b2518faf6fab23f9993498e71ab4fa1f1b812
---
fftools/ffmpeg_enc.c | 66 ++++++++++++++++++++++++++--------------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index c4874b4d78..4b5bd3d9b4 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -228,44 +228,44 @@ static int enc_choose_timebase(OutputStream *ost, AVFrame *frame)
return 0;
}
- fr = ost->frame_rate;
- if (!fr.num)
- fr = fd->frame_rate_filter;
- if (!fr.num && !ost->max_frame_rate.num) {
- fr = (AVRational){25, 1};
- av_log(ost, AV_LOG_WARNING,
- "No information "
- "about the input framerate is available. Falling "
- "back to a default value of 25fps. Use the -r option "
- "if you want a different framerate.\n");
- }
+ fr = ost->frame_rate;
+ if (!fr.num)
+ fr = fd->frame_rate_filter;
+ if (!fr.num && !ost->max_frame_rate.num) {
+ fr = (AVRational){25, 1};
+ av_log(ost, AV_LOG_WARNING,
+ "No information "
+ "about the input framerate is available. Falling "
+ "back to a default value of 25fps. Use the -r option "
+ "if you want a different framerate.\n");
+ }
- if (ost->max_frame_rate.num &&
- (av_q2d(fr) > av_q2d(ost->max_frame_rate) ||
- !fr.den))
- fr = ost->max_frame_rate;
+ if (ost->max_frame_rate.num &&
+ (av_q2d(fr) > av_q2d(ost->max_frame_rate) ||
+ !fr.den))
+ fr = ost->max_frame_rate;
- if (enc->codec->supported_framerates && !ost->force_fps) {
- int idx = av_find_nearest_q_idx(fr, enc->codec->supported_framerates);
- fr = enc->codec->supported_framerates[idx];
- }
- // reduce frame rate for mpeg4 to be within the spec limits
- if (enc->codec_id == AV_CODEC_ID_MPEG4) {
- av_reduce(&fr.num, &fr.den,
- fr.num, fr.den, 65535);
- }
+ if (enc->codec->supported_framerates && !ost->force_fps) {
+ int idx = av_find_nearest_q_idx(fr, enc->codec->supported_framerates);
+ fr = enc->codec->supported_framerates[idx];
+ }
+ // reduce frame rate for mpeg4 to be within the spec limits
+ if (enc->codec_id == AV_CODEC_ID_MPEG4) {
+ av_reduce(&fr.num, &fr.den,
+ fr.num, fr.den, 65535);
+ }
- if (av_q2d(fr) > 1e3 && ost->vsync_method != VSYNC_PASSTHROUGH &&
- (ost->vsync_method == VSYNC_CFR || ost->vsync_method == VSYNC_VSCFR ||
- (ost->vsync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS)))){
- av_log(ost, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"
- "Please consider specifying a lower framerate, a different muxer or "
- "setting vsync/fps_mode to vfr\n");
- }
+ if (av_q2d(fr) > 1e3 && ost->vsync_method != VSYNC_PASSTHROUGH &&
+ (ost->vsync_method == VSYNC_CFR || ost->vsync_method == VSYNC_VSCFR ||
+ (ost->vsync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS)))){
+ av_log(ost, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"
+ "Please consider specifying a lower framerate, a different muxer or "
+ "setting vsync/fps_mode to vfr\n");
+ }
- enc->framerate = fr;
+ enc->framerate = fr;
- ost->st->avg_frame_rate = fr;
+ ost->st->avg_frame_rate = fr;
if (!(tb.num > 0 && tb.den > 0))
tb = av_inv_q(fr);
More information about the ffmpeg-cvslog
mailing list