Commit afa97144 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '077b5594'

* commit '077b5594':
  hevc: handle a NULL sps in set_sps() properly
Merged-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parents d13fc982 077b5594
......@@ -332,13 +332,19 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fm
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;
int ret, i;
export_stream_params(s->avctx, &s->ps, sps);
pic_arrays_free(s);
s->ps.sps = NULL;
s->ps.vps = NULL;
if (!sps)
return 0;
ret = pic_arrays_init(s, sps);
if (ret < 0)
goto fail;
export_stream_params(s->avctx, &s->ps, sps);
if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P) {
#if CONFIG_HEVC_DXVA2_HWACCEL
*fmt++ = AV_PIX_FMT_DXVA2_VLD;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment