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

Showing the changes to libavcodec (3 of 4 files). Show all

Unified · Split

3 files
  1. libavcodec/avcodec.h +15 −0
  2. libavcodec/options_table.h +1 −0
  3. libavcodec/version.h +1 −1
libavcodec/avcodec.h+15−0
@@ -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/**
libavcodec/options_table.h+1−0
@@ -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
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29#include "libavutil/version.h"29#include "libavutil/version.h"
30 30
31#define LIBAVCODEC_VERSION_MAJOR 5531#define LIBAVCODEC_VERSION_MAJOR 55
32#define LIBAVCODEC_VERSION_MINOR 5332#define LIBAVCODEC_VERSION_MINOR 54
33#define LIBAVCODEC_VERSION_MICRO 033#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, \

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