summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-07-12 14:37:15 +0200
committerAnton Khirnov <anton@khirnov.net>2022-08-23 16:50:33 +0200
commita8d977eb9f77bfcac7e8ccdc8d4fa9106cbcc123 (patch)
treeae0eeb423417af7a6216e649bb1b37e1009cf2f5
parent5bac88bea210ab6b325413bf4708a81ab73777bb (diff)
lavc/libtheoraenc: pass through frame durations to encoded packets
-rw-r--r--libavcodec/libtheoraenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 22835553d6..7d372f3857 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -347,6 +347,7 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
// HACK: assumes no encoder delay, this is true until libtheora becomes
// multithreaded (which will be disabled unless explicitly requested)
pkt->pts = pkt->dts = frame->pts;
+ pkt->duration = frame->duration;
if (!(o_packet.granulepos & h->keyframe_mask))
pkt->flags |= AV_PKT_FLAG_KEY;
*got_packet = 1;