diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-14 02:16:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-14 02:16:16 +0200 |
commit | da2189596d9a339d2e6eb2f14137de93b15b354f (patch) | |
tree | a11e6ed2e8f0715fc2d468aa0937ccdf2041fd8a /libavcodec/utils.c | |
parent | 1f20fa2da83922cd73b090b7f336ba51e25b1fb3 (diff) | |
parent | 2df0c32ea12ddfa72ba88309812bfb13b674130f (diff) | |
download | ffmpeg-da2189596d9a339d2e6eb2f14137de93b15b354f.tar.gz |
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/utils.c')
-rw-r--r-- | libavcodec/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 3bab3ea3a7..1b5e3e01d6 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1609,6 +1609,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code ret=0; +#if FF_API_AUDIOENC_DELAY + if (av_codec_is_encoder(avctx->codec)) + avctx->delay = avctx->initial_padding; +#endif + if (av_codec_is_decoder(avctx->codec)) { if (!avctx->bit_rate) avctx->bit_rate = get_bit_rate(avctx); @@ -1921,6 +1926,10 @@ end: av_frame_free(&padded_frame); av_free(extended_frame); +#if FF_API_AUDIOENC_DELAY + avctx->delay = avctx->initial_padding; +#endif + return ret; } |