Some encoders (e.g. flac) need to send side data when there is no more data to be output. This enables them to output a packet with no data in it, only side data.
Showing the changes to libavcodec (3 of 4 files). Show all
Unified · Split
| @@ -2730,6 +2730,21 @@ typedef struct AVCodecContext { · 2729 unmodified lines | |||
| 2730 | * - decoding: unused. | 2730 | * - decoding: unused. |
| 2731 | */ | 2731 | */ |
| 2732 | uint64_t vbv_delay; | 2732 | uint64_t vbv_delay; |
| 2733 | |||
| 2734 | /** | ||
| 2735 | * Encoding only. Allow encoders to output packets that do not contain any | ||
| 2736 | * encoded data, only side data. | ||
| 2737 | * | ||
| 2738 | * Some encoders need to output such packets, e.g. to update some stream | ||
| 2739 | * parameters at the end of encoding. | ||
| 2740 | * | ||
| 2741 | * All callers are strongly recommended to set this option to 1 and update | ||
| 2742 | * their code to deal with such packets, since this behaviour may become | ||
| 2743 | * always enabled in the future (then this option will be deprecated and | ||
| 2744 | * later removed). To avoid ABI issues when this happens, the callers should | ||
| 2745 | * use AVOptions to set this field. | ||
| 2746 | */ | ||
| 2747 | int side_data_only_packets; | ||
| 2733 | } AVCodecContext; | 2748 | } AVCodecContext; |
| 2734 | 2749 | ||
| 2735 | /** | 2750 | /** |
| @@ -399,6 +399,7 @@ static const AVOption avcodec_options[] = { · 398 unmodified lines | |||
| 399 | {"fltp", "32-bit float planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_FLTP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, | 399 | {"fltp", "32-bit float planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_FLTP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, |
| 400 | {"dblp", "64-bit double planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_DBLP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, | 400 | {"dblp", "64-bit double planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_DBLP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, |
| 401 | {"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, A|V|D }, | 401 | {"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, A|V|D }, |
| 402 | {"side_data_only_packets", NULL, OFFSET(side_data_only_packets), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, A|V|E }, | ||
| 402 | {NULL}, | 403 | {NULL}, |
| 403 | }; | 404 | }; |
| 404 | 405 | ||
| @@ -29,7 +29,7 @@ · 28 unmodified lines | |||
| 29 | #include "libavutil/version.h" | 29 | #include "libavutil/version.h" |
| 30 | 30 | ||
| 31 | #define LIBAVCODEC_VERSION_MAJOR 55 | 31 | #define LIBAVCODEC_VERSION_MAJOR 55 |
| 32 | #define LIBAVCODEC_VERSION_MINOR 53 | 32 | #define LIBAVCODEC_VERSION_MINOR 54 |
| 33 | #define LIBAVCODEC_VERSION_MICRO 0 | 33 | #define LIBAVCODEC_VERSION_MICRO 0 |
| 34 | 34 | ||
| 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |