mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
libavcodec/vorbisenc: Add missing initial_padding
Vorbis has priming samples at the beginning. If the initial_padding is not set in the encoder, the total sample count will be one frame fewer than it should be. The result is that we get a truncated version of encoding. initial_padding should be set to the frame_size used in vorbis_encode_frame(). Signed-off-by: Guangyu Sun <gsun@roblox.com>
This commit is contained in:
parent
75510d7015
commit
24b3178efd
1 changed files with 1 additions and 0 deletions
|
|
@ -1287,6 +1287,7 @@ static av_cold int vorbis_encode_init(AVCodecContext *avctx)
|
|||
avctx->extradata_size = ret;
|
||||
|
||||
avctx->frame_size = 64;
|
||||
avctx->initial_padding = 1 << (venc->log2_blocksize[1] - 1);
|
||||
|
||||
ff_af_queue_init(avctx, &venc->afq);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue