summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-12 00:14:32 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-14 18:38:55 +0200
commit202da3bf486c8168170597b01f8261de288c250c (patch)
treef3c4ef69885e6224970c057850dbb50c38aae542
parentf703cbabdb9bd0f7599d78c6ff1e8a2f38a502b3 (diff)
avcodec/mjpegenc: Don't unnecessarily grow buffer
The size of the ICC chunk has already been accounted for when the packet's buffer was initially set in ff_mpv_encode_picture() and the header (including the ICC chunk) has already been written at this point. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/mjpegenc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 1e9b97535a..8cada8366c 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -131,7 +131,6 @@ static void mjpeg_encode_picture_frame(MpegEncContext *s)
}
bytes_needed = (total_bits + 7) / 8;
- ff_mjpeg_add_icc_profile_size(s->avctx, s->picture->f, &bytes_needed);
ff_mpv_reallocate_putbitbuffer(s, bytes_needed, bytes_needed);
for (int i = 0; i < m->huff_ncode; i++) {