[FFmpeg-devel] [PATCH 1/2] avcodec/vorbisenc: Include bufqueue and afqueue
Tyler Jones
tdjones879 at gmail.com
Tue May 30 20:28:04 EEST 2017
---
libavcodec/vorbisenc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index 2974ca2..fdce864 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -33,6 +33,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"
@@ -110,6 +113,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;
@@ -1158,6 +1164,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);
@@ -1190,6 +1198,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);
--
2.7.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170530/48976194/attachment.sig>
More information about the ffmpeg-devel
mailing list