[FFmpeg-cvslog] flashsv2enc:fix segfault

Michael Niedermayer git at videolan.org
Fri Apr 29 21:52:56 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 29 18:31:17 2011 +0200| [4517ba092e0606e9473c8e148c9895b01f975e18] | committer: Michael Niedermayer

flashsv2enc:fix segfault
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4517ba092e0606e9473c8e148c9895b01f975e18
---

 libavcodec/flashsv2enc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index eedb902..7ee299c 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list