h264: don't initialize missing pictures when using a hwaccel

Writing into uninitialized hw surfaces is not supported and triggers an assert inside avpriv_color_frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/8/merge
Hendrik Leppkes 12 years ago committed by Michael Niedermayer
parent a56fd9edab
commit 1d6f6ff4d9
  1. 2
      libavcodec/h264.c

@ -1704,7 +1704,7 @@ int ff_h264_frame_start(H264Context *h)
if ((ret = alloc_picture(h, pic)) < 0)
return ret;
if(!h->sync)
if(!h->sync && !h->avctx->hwaccel)
avpriv_color_frame(&pic->f, c);
h->cur_pic_ptr = pic;

Loading…
Cancel
Save