From 1d6f6ff4d9faf309b1ea38dc11b38c90b72b03fd Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sun, 17 Feb 2013 00:25:34 +0100 Subject: [PATCH] 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 --- libavcodec/h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 84183108dd..89fc2227ae 100644 --- a/libavcodec/h264.c +++ b/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;