aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Jones <tdjones879@gmail.com>2017-05-30 11:28:04 -0600
committerRostislav Pehlivanov <atomnuker@gmail.com>2017-06-05 16:35:05 +0100
commit25260b5161af064b95a258e4a5805b16946d0575 (patch)
treebe2be3fbafb265dadebe6fdb580eccc2ca883a00
parent79941602a317b45dcf3d1c4d700fe4678e02a0fe (diff)
downloadffmpeg-25260b5161af064b95a258e4a5805b16946d0575.tar.gz
avcodec/vorbisenc: Include bufqueue and afqueue
-rw-r--r--libavcodec/vorbisenc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index 1777a493dd..f196d79d84 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -34,6 +34,9 @@
#include "vorbis.h"
#include "vorbis_enc_data.h"
+#include "audio_frame_queue.h"
+#include "libavfilter/bufferqueue.h"
+
#define BITSTREAM_WRITER_LE
#include "put_bits.h"
@@ -111,6 +114,9 @@ typedef struct vorbis_enc_context {
float *coeffs; // also used for residue after floor
float quality;
+ AudioFrameQueue afq;
+ struct FFBufQueue bufqueue;
+
int ncodebooks;
vorbis_enc_codebook *codebooks;
@@ -1179,6 +1185,8 @@ static av_cold int vorbis_encode_close(AVCodecContext *avctx)
ff_mdct_end(&venc->mdct[0]);
ff_mdct_end(&venc->mdct[1]);
+ ff_af_queue_close(&venc->afq);
+ ff_bufqueue_discard_all(&venc->bufqueue);
av_freep(&avctx->extradata);
@@ -1211,6 +1219,8 @@ static av_cold int vorbis_encode_init(AVCodecContext *avctx)
avctx->frame_size = 1 << (venc->log2_blocksize[0] - 1);
+ ff_af_queue_init(avctx, &venc->afq);
+
return 0;
error:
vorbis_encode_close(avctx);