summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-08-23 12:40:50 +0000
committerAnton Khirnov <anton@khirnov.net>2014-10-13 19:09:01 +0000
commit2df0c32ea12ddfa72ba88309812bfb13b674130f (patch)
tree50677fbc787646c10931f8ba95e32883173f7bfb /libavcodec/ac3enc.c
parentc80a816142699dea9cf9fa66689a7838a487ed7e (diff)
lavc: use a separate field for exporting audio encoder padding
Currently, the amount of padding inserted at the beginning by some audio encoders, is exported through AVCodecContext.delay. However - the term 'delay' is heavily overloaded and can have multiple different meanings even in the case of audio encoding. - this field has entirely different meanings, depending on whether the codec context is used for encoding or decoding (and has yet another different meaning for video), preventing generic handling of the codec context. Therefore, add a new field -- AVCodecContext.initial_padding. It could conceivably be used for decoding as well at a later point.
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 5c02e7f9de..13666efc21 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2436,7 +2436,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
return ret;
avctx->frame_size = AC3_BLOCK_SIZE * s->num_blocks;
- avctx->delay = AC3_BLOCK_SIZE;
+ avctx->initial_padding = AC3_BLOCK_SIZE;
s->bitstream_mode = avctx->audio_service_type;
if (s->bitstream_mode == AV_AUDIO_SERVICE_TYPE_KARAOKE)