Browse Source

mpegvideo: fix overwriting hwaccel surface objects

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Hendrik Leppkes Michael Niedermayer 12 years ago
parent
commit
fa84231ee8
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/mpegvideo.c

+ 2
- 0
libavcodec/mpegvideo.c View File

@@ -1774,6 +1774,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
return -1; return -1;
} }


if (!avctx->hwaccel) {
for(i=0; i<avctx->height; i++) for(i=0; i<avctx->height; i++)
memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i,
0x80, avctx->width); 0x80, avctx->width);
@@ -1788,6 +1789,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
for(i=0; i<avctx->height; i++) 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); 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, 0);
ff_thread_report_progress(&s->last_picture_ptr->tf, INT_MAX, 1); ff_thread_report_progress(&s->last_picture_ptr->tf, INT_MAX, 1);


Loading…
Cancel
Save