mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
lavc: deprecate the use of AVCodecContext.time_base for decoding
When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding.
This commit is contained in:
@@ -55,7 +55,7 @@ static av_cold int tgv_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
TgvContext *s = avctx->priv_data;
|
||||
s->avctx = avctx;
|
||||
avctx->time_base = (AVRational){1, 15};
|
||||
avctx->framerate = (AVRational){ 15, 1 };
|
||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
|
||||
s->last_frame = av_frame_alloc();
|
||||
|
||||
Reference in New Issue
Block a user