summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-14 02:16:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-14 02:16:16 +0200
commitda2189596d9a339d2e6eb2f14137de93b15b354f (patch)
treea11e6ed2e8f0715fc2d468aa0937ccdf2041fd8a /libavcodec/avcodec.h
parent1f20fa2da83922cd73b090b7f336ba51e25b1fb3 (diff)
parent2df0c32ea12ddfa72ba88309812bfb13b674130f (diff)
Merge commit '2df0c32ea12ddfa72ba88309812bfb13b674130f'
* commit '2df0c32ea12ddfa72ba88309812bfb13b674130f': lavc: use a separate field for exporting audio encoder padding Conflicts: libavcodec/audio_frame_queue.c libavcodec/avcodec.h libavcodec/libvorbisenc.c libavcodec/utils.c libavcodec/version.h libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index a5a651a635..f9ab7c2da9 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1373,16 +1373,7 @@ typedef struct AVCodecContext {
* encoded input.
*
* Audio:
- * For encoding, this is the number of "priming" samples added by the
- * encoder to the beginning of the stream. The decoded output will be
- * delayed by this many samples relative to the input to the encoder (or
- * more, if the decoder adds its own padding).
- * The timestamps on the output packets are adjusted by the encoder so
- * that they always refer to the first sample of the data actually
- * contained in the packet, including any added padding.
- * E.g. if the timebase is 1/samplerate and the timestamp of the first
- * input sample is 0, the timestamp of the first output packet will be
- * -delay.
+ * For encoding, this field is unused (see initial_padding).
*
* For decoding, this is the number of samples the decoder needs to
* output before the decoder's output is valid. When seeking, you should
@@ -2981,6 +2972,23 @@ typedef struct AVCodecContext {
int side_data_only_packets;
/**
+ * Audio only. The number of "priming" samples (padding) inserted by the
+ * encoder at the beginning of the audio. I.e. this number of leading
+ * decoded samples must be discarded by the caller to get the original audio
+ * without leading padding.
+ *
+ * - decoding: unused
+ * - encoding: Set by libavcodec. The timestamps on the output packets are
+ * adjusted by the encoder so that they always refer to the
+ * first sample of the data actually contained in the packet,
+ * including any added padding. E.g. if the timebase is
+ * 1/samplerate and the timestamp of the first input sample is
+ * 0, the timestamp of the first output packet will be
+ * -initial_padding.
+ */
+ int initial_padding;
+
+ /**
* Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
* Code outside libavcodec should access this field using:
* av_codec_{get,set}_pkt_timebase(avctx)