summaryrefslogtreecommitdiff
path: root/libavcodec/vorbisenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-25 00:59:42 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-03-30 12:36:31 +0200
commite4ccd348c15d30d24e1270b4cd3455c7ebaeb229 (patch)
tree2e647c7143e9e4e29adeb36fefacc07e99442aef /libavcodec/vorbisenc.c
parent7fc8ba9068abc4c4cb3fbca4a25b53710ec374b6 (diff)
avcodec/vorbisenc: Remove always-false check
The PutBitContext is big enough: It has just been initialized to 8192B. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/vorbisenc.c')
-rw-r--r--libavcodec/vorbisenc.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index 18a679f2dc..f8a08f816f 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -1135,11 +1135,6 @@ static int vorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
init_put_bits(&pb, avpkt->data, avpkt->size);
- if (pb.size_in_bits - put_bits_count(&pb) < 1 + ilog(venc->nmodes - 1)) {
- av_log(avctx, AV_LOG_ERROR, "output buffer is too small\n");
- return AVERROR(EINVAL);
- }
-
put_bits(&pb, 1, 0); // magic bit
put_bits(&pb, ilog(venc->nmodes - 1), 1); // Mode for current frame