[FFmpeg-devel] [PATCH] avcodec/gif: fix duration of last packet/frame
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Aug 23 15:18:17 EEST 2022
Paul B Mahol:
> Hi,
>
> patch attached.
>
> return ret;
> }
>
> + pkt->duration = av_rescale_q(pict->duration, (AVRational){ 1, 100 },
> + avctx->time_base);
> pkt->size = outbuf_ptr - pkt->data;
> if (s->image || !avctx->frame_number)
> pkt->flags |= AV_PKT_FLAG_KEY;
Where does the magic 1/100 timebase come from? For encoding, the
AVFrame's time base is supposed to be AVCodecContext.time_base. This
could actually be done generically for all video-encoders without delay.
(I know that AVFrame has a time_base of its own that is currently unset
and unused.)
- Andreas
More information about the ffmpeg-devel
mailing list