This adds a time_base field to AVFrame, as an analogue to the AVPacket.time_base field.
Unified · Split
| @@ -14,6 +14,9 @@ libavutil: 2021-04-27 · 13 unmodified lines | ||
| 14 | 14 | |
| 15 | 15 | API changes, most recent first: |
| 16 | 16 | |
| 17 | +2021-12-03 - xxxxxxxxxx - lavu 57.10.100 - frame.h | |
| 18 | + Add AVFrame.time_base | |
| 19 | + | |
| 17 | 20 | 2021-11-22 - xxxxxxxxxx - lavu 57.9.100 - pixfmt.h |
| 18 | 21 | Add AV_PIX_FMT_P210, AV_PIX_FMT_P410, AV_PIX_FMT_P216, and AV_PIX_FMT_P416. |
| 19 | 22 | |
| @@ -63,6 +63,7 @@ static void get_frame_defaults(AVFrame *frame) · 62 unmodified lines | ||
| 63 | 63 | frame->pkt_duration = 0; |
| 64 | 64 | frame->pkt_pos = -1; |
| 65 | 65 | frame->pkt_size = -1; |
| 66 | + frame->time_base = (AVRational){ 0, 1 }; | |
| 66 | 67 | frame->key_frame = 1; |
| 67 | 68 | frame->sample_aspect_ratio = (AVRational){ 0, 1 }; |
| 68 | 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 | 279 | dst->pkt_pos = src->pkt_pos; |
| 279 | 280 | dst->pkt_size = src->pkt_size; |
| 280 | 281 | dst->pkt_duration = src->pkt_duration; |
| 282 | + dst->time_base = src->time_base; | |
| 281 | 283 | dst->reordered_opaque = src->reordered_opaque; |
| 282 | 284 | dst->quality = src->quality; |
| 283 | 285 | dst->best_effort_timestamp = src->best_effort_timestamp; |
| @@ -421,6 +421,14 @@ typedef struct AVFrame { · 420 unmodified lines | ||
| 421 | 421 | */ |
| 422 | 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 | 433 | * picture number in bitstream order |
| 426 | 434 | */ |
| @@ -79,7 +79,7 @@ · 78 unmodified lines | ||
| 79 | 79 | */ |
| 80 | 80 | |
| 81 | 81 | #define LIBAVUTIL_VERSION_MAJOR 57 |
| 82 | −#define LIBAVUTIL_VERSION_MINOR 9 | |
| 82 | +#define LIBAVUTIL_VERSION_MINOR 10 | |
| 83 | 83 | #define LIBAVUTIL_VERSION_MICRO 101 |
| 84 | 84 | |
| 85 | 85 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |