History

lavc: add an option to enable side data-only packets during encoding

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.

Anton Khirnov committed 12 years ago

Commit 0957b271 parent eb800f14 files · +22 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +5 −0
  2. libavcodec/avcodec.h +15 −0
  3. libavcodec/options_table.h +1 −0
  4. libavcodec/version.h +1 −1
doc/APIchanges+5−0
@@ -13,6 +13,11 @@ libavutil: 2013-12-xx · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2014-04-xx - xxxxxxx - lavc 55.54.0 - avcodec.h
17+ Add AVCodecContext.side_data_only_packets to allow encoders to output packets
18+ with only side data. This option may become mandatory in the future, so all
19+ users are recommended to update their code and enable this option.
20+
1621 2014-xx-xx - xxxxxxx - lavu 53.16.0 - frame.h, pixfmt.h
1722 Move all color-related enums (AVColorPrimaries, AVColorSpace, AVColorRange,
1823 AVColorTransferCharacteristic, and AVChromaLocation) inside lavu.
libavcodec/avcodec.h+15−0
@@ -2730,6 +2730,21 @@ typedef struct AVCodecContext { · 2729 unmodified lines
27302730 * - decoding: unused.
27312731 */
27322732 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;
27332748 } AVCodecContext;
27342749
27352750 /**
libavcodec/options_table.h+1−0
@@ -399,6 +399,7 @@ static const AVOption avcodec_options[] = { · 398 unmodified lines
399399 {"fltp", "32-bit float planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_FLTP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"},
400400 {"dblp", "64-bit double planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_DBLP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"},
401401 {"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 },
402403 {NULL},
403404 };
404405
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 #include "libavutil/version.h"
3030
3131 #define LIBAVCODEC_VERSION_MAJOR 55
32−#define LIBAVCODEC_VERSION_MINOR 53
32+#define LIBAVCODEC_VERSION_MINOR 54
3333 #define LIBAVCODEC_VERSION_MICRO 0
3434
3535 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_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