(One-line) Patch attached:
> --- a/libavcodec/encode.c
> +++ b/libavcodec/encode.c
> @@ -44,6 +44,7 @@ int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt,
> int64_t size)
> av_fast_padded_malloc(&avctx->internal->byte_buffer,
> &avctx->internal->byte_buffer_size, size);
> avpkt->data = avctx->internal->byte_buffer;
> + avpkt->time_base = avctx->time_base;
> if (!avpkt->data) {
> av_log(avctx, AV_LOG_ERROR, "Failed to allocate packet of size
>%"PRId64"\n", size);
> return AVERROR(ENOMEM);
I'm not sure if this is the correct place to do this.
>From 1fc1148c5db3700c927d4e1ec8c3b4cdc344f55f Mon Sep 17 00:00:00 2001
From: Lynne <[email protected]>
Date: Mon, 2 Aug 2021 14:33:41 +0200
Subject: [PATCH 2/2] encode: copy the context timebase to the packet timebase
---
libavcodec/encode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 98dfbfdff3..d4084b42da 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -44,6 +44,7 @@ int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
av_fast_padded_malloc(&avctx->internal->byte_buffer,
&avctx->internal->byte_buffer_size, size);
avpkt->data = avctx->internal->byte_buffer;
+ avpkt->time_base = avctx->time_base;
if (!avpkt->data) {
av_log(avctx, AV_LOG_ERROR, "Failed to allocate packet of size %"PRId64"\n", size);
return AVERROR(ENOMEM);
--
2.32.0.272.g935e593368
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".