mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
Merge commit '7ea1b3472a'
* commit '7ea1b3472a':
lavc: deprecate the use of AVCodecContext.time_base for decoding
Conflicts:
libavcodec/avcodec.h
libavcodec/h264.c
libavcodec/mpegvideo_parser.c
libavcodec/utils.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
17085a0251
27 changed files with 91 additions and 61 deletions
|
|
@ -1674,6 +1674,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if FF_API_AVCTX_TIMEBASE
|
||||
if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
||||
avctx->time_base = av_inv_q(avctx->framerate);
|
||||
#endif
|
||||
}
|
||||
end:
|
||||
ff_unlock_avcodec();
|
||||
|
|
@ -2384,6 +2389,11 @@ fail:
|
|||
* make sure it's set correctly */
|
||||
av_assert0(!picture->extended_data || picture->extended_data == picture->data);
|
||||
|
||||
#if FF_API_AVCTX_TIMEBASE
|
||||
if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
|
||||
avctx->time_base = av_inv_q(avctx->framerate);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue