aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-04 22:21:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-04 22:22:04 +0200
commitcb678cc2cf4667dafb814da8661a5ef4a59a64db (patch)
treec3c14ab798e924102c68079d8fb980621b9dc4d1
parentd1c96b28d7b6c9db9a6c5d19d33b41311bbe2ca6 (diff)
downloadffmpeg-cb678cc2cf4667dafb814da8661a5ef4a59a64db.tar.gz
avcodec/svq1enc: fix frame rotation code
Fixes Ticket2747 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/svq1enc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index afef854f4c..5b4748f319 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);