Commit 4517ba09 authored by Michael Niedermayer's avatar Michael Niedermayer

flashsv2enc:fix segfault

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d804784d
......@@ -242,7 +242,6 @@ static av_cold int flashsv2_encode_init(AVCodecContext * avctx)
static int new_key_frame(FlashSV2Context * s)
{
int i;
FFSWAP(uint8_t * , s->keybuffer, s->encbuffer);
memcpy(s->key_blocks, s->frame_blocks, s->blocks_size);
memcpy(s->key_frame, s->current_frame, s->frame_size);
......@@ -252,6 +251,7 @@ static int new_key_frame(FlashSV2Context * s)
s->key_blocks[i].sl_end = 0;
s->key_blocks[i].data = 0;
}
FFSWAP(uint8_t * , s->keybuffer, s->encbuffer);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment