[FFmpeg-devel] [PATCH] avcodec: fix misleading indentation warnings after ticks_per_frame deprecation
Marton Balint
cus at passwd.hu
Thu Jul 27 22:10:15 EEST 2023
On Sat, 22 Jul 2023, Marton Balint wrote:
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavcodec/libaomenc.c | 3 ++-
> libavcodec/libvpxenc.c | 3 ++-
> libavcodec/msmpeg4enc.c | 3 ++-
> 3 files changed, 6 insertions(+), 3 deletions(-)
Will apply.
Regards,
Marton
>
> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> index 16747e7e92..f29cb0784a 100644
> --- a/libavcodec/libaomenc.c
> +++ b/libavcodec/libaomenc.c
> @@ -1299,7 +1299,7 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt,
> duration = frame->duration;
> else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
> duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
> - else
> + else {
> FF_DISABLE_DEPRECATION_WARNINGS
> duration =
> #if FF_API_TICKS_PER_FRAME
> @@ -1307,6 +1307,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
> #endif
> 1;
> FF_ENABLE_DEPRECATION_WARNINGS
> + }
>
> switch (frame->color_range) {
> case AVCOL_RANGE_MPEG:
> diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
> index 549ac55aaa..7a545527a9 100644
> --- a/libavcodec/libvpxenc.c
> +++ b/libavcodec/libvpxenc.c
> @@ -1830,7 +1830,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
> duration = frame->duration;
> else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
> duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
> - else
> + else {
> FF_DISABLE_DEPRECATION_WARNINGS
> duration =
> #if FF_API_TICKS_PER_FRAME
> @@ -1838,6 +1838,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
> #endif
> 1;
> FF_ENABLE_DEPRECATION_WARNINGS
> + }
>
> res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp,
> duration, flags, ctx->deadline);
> diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
> index 9828901bea..a8ddb8d8e1 100644
> --- a/libavcodec/msmpeg4enc.c
> +++ b/libavcodec/msmpeg4enc.c
> @@ -284,7 +284,7 @@ void ff_msmpeg4_encode_ext_header(MpegEncContext * s)
>
> if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0)
> fps = s->avctx->framerate.num / s->avctx->framerate.den;
> - else
> + else {
> FF_DISABLE_DEPRECATION_WARNINGS
> fps = s->avctx->time_base.den / s->avctx->time_base.num
> #if FF_API_TICKS_PER_FRAME
> @@ -292,6 +292,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
> #endif
> ;
> FF_ENABLE_DEPRECATION_WARNINGS
> + }
>
> put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29
>
> --
> 2.35.3
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list