mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
f703cbabdb
commit
202da3bf48
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue