[FFmpeg-cvslog] avcodec/svq1enc: fix frame rotation code

Michael Niedermayer git at videolan.org
Thu Jul 4 22:34:10 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jul  4 22:21:27 2013 +0200| [cb678cc2cf4667dafb814da8661a5ef4a59a64db] | committer: Michael Niedermayer

avcodec/svq1enc: fix frame rotation code

Fixes Ticket2747

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

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

 libavcodec/svq1enc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index afef854..5b4748f 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -557,9 +557,9 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
     }
 
-    temp               = s->current_picture;
-    s->current_picture = s->last_picture;
-    s->last_picture    = temp;
+    av_frame_move_ref(&temp, &s->current_picture);
+    av_frame_move_ref(&s->current_picture, &s->last_picture);
+    av_frame_move_ref(&s->last_picture, &temp);
 
     init_put_bits(&s->pb, pkt->data, pkt->size);
 



More information about the ffmpeg-cvslog mailing list