aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/frame.c
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2021-11-25 18:26:20 +0100
committerLynne <dev@lynne.ee>2021-12-03 22:41:00 +0100
commitb236ef0a594e20038b4045e2fecd414f1886d212 (patch)
treeb67579c48cb41c9e86e1624b0996f672ffe4ee64 /libavutil/frame.c
parent03ab1de429a43a99c6de0c0d6ec1d275349dc133 (diff)
downloadffmpeg-b236ef0a594e20038b4045e2fecd414f1886d212.tar.gz
lavu/avframe: add a time_base field
This adds a time_base field to AVFrame, as an analogue to the AVPacket.time_base field.
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r--libavutil/frame.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index d4d3ad6988..64eed5b0dd 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -63,6 +63,7 @@ static void get_frame_defaults(AVFrame *frame)
frame->pkt_duration = 0;
frame->pkt_pos = -1;
frame->pkt_size = -1;
+ frame->time_base = (AVRational){ 0, 1 };
frame->key_frame = 1;
frame->sample_aspect_ratio = (AVRational){ 0, 1 };
frame->format = -1; /* unknown */
@@ -278,6 +279,7 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)
dst->pkt_pos = src->pkt_pos;
dst->pkt_size = src->pkt_size;
dst->pkt_duration = src->pkt_duration;
+ dst->time_base = src->time_base;
dst->reordered_opaque = src->reordered_opaque;
dst->quality = src->quality;
dst->best_effort_timestamp = src->best_effort_timestamp;