[FFmpeg-cvslog] mpegvideo: fix overwriting hwaccel surface objects

Hendrik Leppkes git at videolan.org
Tue Feb 25 14:18:37 CET 2014


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Tue Feb 25 11:47:27 2014 +0100| [fa84231ee8f399518cec8ea48efa386eb149cd21] | committer: Michael Niedermayer

mpegvideo: fix overwriting hwaccel surface objects

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

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

 libavcodec/mpegvideo.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 441e7fc..b9d8f54 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);



More information about the ffmpeg-cvslog mailing list