1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

hevcdec: set the active SPS before calling get_format()

This way the SPS is available to the hwaccel init code.
This commit is contained in:
Anton Khirnov
2017-07-24 11:41:31 +02:00
parent a58873b111
commit 00fd914d49

View File

@@ -490,13 +490,14 @@ static int hls_slice_header(HEVCContext *s)
ff_hevc_clear_refs(s);
ret = set_sps(s, sps, sps->pix_fmt);
if (ret < 0)
return ret;
pix_fmt = get_format(s, sps);
if (pix_fmt < 0)
return pix_fmt;
ret = set_sps(s, sps, pix_fmt);
if (ret < 0)
return ret;
s->avctx->pix_fmt = pix_fmt;
s->seq_decode = (s->seq_decode + 1) & 0xff;
s->max_ra = INT_MAX;