mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/mpegvideo_enc: Fix leak on bitstream buffer reallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1441641d78
commit
61c0683080
@ -2795,6 +2795,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
av_fast_padded_malloc(&new_buffer, &new_buffer_size, new_size);
|
||||
if (new_buffer) {
|
||||
memcpy(new_buffer, s->avctx->internal->byte_buffer, s->avctx->internal->byte_buffer_size);
|
||||
av_free(s->avctx->internal->byte_buffer);
|
||||
s->avctx->internal->byte_buffer = new_buffer;
|
||||
s->avctx->internal->byte_buffer_size = new_buffer_size;
|
||||
rebase_put_bits(&s->pb, new_buffer, new_buffer_size);
|
||||
|
Loading…
Reference in New Issue
Block a user