aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2014-02-25 11:47:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-25 13:47:10 +0100
commitfa84231ee8f399518cec8ea48efa386eb149cd21 (patch)
treea7d1404e302a1871ac9208dd03047b068712a2c8
parentbef6b27f106f9ef67fff1f8fc2ceb5dc3deb51f2 (diff)
downloadffmpeg-fa84231ee8f399518cec8ea48efa386eb149cd21.tar.gz
mpegvideo: fix overwriting hwaccel surface objects
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 441e7fc8f3..b9d8f549c5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1774,6 +1774,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
return -1;
}
+ if (!avctx->hwaccel) {
for(i=0; i<avctx->height; i++)
memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i,
0x80, avctx->width);
@@ -1788,6 +1789,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
for(i=0; i<avctx->height; i++)
memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, 16, avctx->width);
}
+ }
ff_thread_report_progress(&s->last_picture_ptr->tf, INT_MAX, 0);
ff_thread_report_progress(&s->last_picture_ptr->tf, INT_MAX, 1);