History

lavu/avframe: add a time_base field

This adds a time_base field to AVFrame, as an analogue to the AVPacket.time_base field.

Lynne committed 4 years ago

Commit b236ef01 parent 03ab1de4 files · +14 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavutil/frame.c +2 −0
  3. libavutil/frame.h +8 −0
  4. libavutil/version.h +1 −1
doc/APIchanges+3−0
@@ -14,6 +14,9 @@ libavutil: 2021-04-27 · 13 unmodified lines
14 14
15API changes, most recent first:15API changes, most recent first:
16 16
172021-12-03 - xxxxxxxxxx - lavu 57.10.100 - frame.h
18 Add AVFrame.time_base
19
172021-11-22 - xxxxxxxxxx - lavu 57.9.100 - pixfmt.h202021-11-22 - xxxxxxxxxx - lavu 57.9.100 - pixfmt.h
18 Add AV_PIX_FMT_P210, AV_PIX_FMT_P410, AV_PIX_FMT_P216, and AV_PIX_FMT_P416.21 Add AV_PIX_FMT_P210, AV_PIX_FMT_P410, AV_PIX_FMT_P216, and AV_PIX_FMT_P416.
19 22
libavutil/frame.c+2−0
@@ -63,6 +63,7 @@ static void get_frame_defaults(AVFrame *frame) · 62 unmodified lines
63 frame->pkt_duration = 0;63 frame->pkt_duration = 0;
64 frame->pkt_pos = -1;64 frame->pkt_pos = -1;
65 frame->pkt_size = -1;65 frame->pkt_size = -1;
66 frame->time_base = (AVRational){ 0, 1 };
66 frame->key_frame = 1;67 frame->key_frame = 1;
67 frame->sample_aspect_ratio = (AVRational){ 0, 1 };68 frame->sample_aspect_ratio = (AVRational){ 0, 1 };
68 frame->format = -1; /* unknown */69 frame->format = -1; /* unknown */
@@ -278,6 +279,7 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) · 209 unmodified lines
278 dst->pkt_pos = src->pkt_pos;279 dst->pkt_pos = src->pkt_pos;
279 dst->pkt_size = src->pkt_size;280 dst->pkt_size = src->pkt_size;
280 dst->pkt_duration = src->pkt_duration;281 dst->pkt_duration = src->pkt_duration;
282 dst->time_base = src->time_base;
281 dst->reordered_opaque = src->reordered_opaque;283 dst->reordered_opaque = src->reordered_opaque;
282 dst->quality = src->quality;284 dst->quality = src->quality;
283 dst->best_effort_timestamp = src->best_effort_timestamp;285 dst->best_effort_timestamp = src->best_effort_timestamp;
libavutil/frame.h+8−0
@@ -421,6 +421,14 @@ typedef struct AVFrame { · 420 unmodified lines
421 */421 */
422 int64_t pkt_dts;422 int64_t pkt_dts;
423 423
424 /**
425 * Time base for the timestamps in this frame.
426 * In the future, this field may be set on frames output by decoders or
427 * filters, but its value will be by default ignored on input to encoders
428 * or filters.
429 */
430 AVRational time_base;
431
424 /**432 /**
425 * picture number in bitstream order433 * picture number in bitstream order
426 */434 */
libavutil/version.h+1−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
79 */79 */
80 80
81#define LIBAVUTIL_VERSION_MAJOR 5781#define LIBAVUTIL_VERSION_MAJOR 57
82#define LIBAVUTIL_VERSION_MINOR 982#define LIBAVUTIL_VERSION_MINOR 10
83#define LIBAVUTIL_VERSION_MICRO 10183#define LIBAVUTIL_VERSION_MICRO 101
84 84
85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t