You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec: fix misleading indentation warnings after ticks_per_frame deprecation
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -1299,7 +1299,7 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
duration = frame->duration;
|
duration = frame->duration;
|
||||||
else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
||||||
duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
|
duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
|
||||||
else
|
else {
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
duration =
|
duration =
|
||||||
#if FF_API_TICKS_PER_FRAME
|
#if FF_API_TICKS_PER_FRAME
|
||||||
@@ -1307,6 +1307,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
|||||||
#endif
|
#endif
|
||||||
1;
|
1;
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
}
|
||||||
|
|
||||||
switch (frame->color_range) {
|
switch (frame->color_range) {
|
||||||
case AVCOL_RANGE_MPEG:
|
case AVCOL_RANGE_MPEG:
|
||||||
|
@@ -1830,7 +1830,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
duration = frame->duration;
|
duration = frame->duration;
|
||||||
else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
||||||
duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
|
duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
|
||||||
else
|
else {
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
duration =
|
duration =
|
||||||
#if FF_API_TICKS_PER_FRAME
|
#if FF_API_TICKS_PER_FRAME
|
||||||
@@ -1838,6 +1838,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
|||||||
#endif
|
#endif
|
||||||
1;
|
1;
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
}
|
||||||
|
|
||||||
res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp,
|
res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp,
|
||||||
duration, flags, ctx->deadline);
|
duration, flags, ctx->deadline);
|
||||||
|
@@ -284,7 +284,7 @@ void ff_msmpeg4_encode_ext_header(MpegEncContext * s)
|
|||||||
|
|
||||||
if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0)
|
if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0)
|
||||||
fps = s->avctx->framerate.num / s->avctx->framerate.den;
|
fps = s->avctx->framerate.num / s->avctx->framerate.den;
|
||||||
else
|
else {
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
fps = s->avctx->time_base.den / s->avctx->time_base.num
|
fps = s->avctx->time_base.den / s->avctx->time_base.num
|
||||||
#if FF_API_TICKS_PER_FRAME
|
#if FF_API_TICKS_PER_FRAME
|
||||||
@@ -292,6 +292,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
}
|
||||||
|
|
||||||
put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29
|
put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user