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>
This commit is contained in:
Hendrik Leppkes 2013-02-17 00:25:34 +01:00 committed by Michael Niedermayer
parent a56fd9edab
commit 1d6f6ff4d9

View File

@ -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;