diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-07-24 11:41:31 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-07-24 15:08:14 +0200 |
commit | 996892eafb17b393254be9e74f59b1f703bb8384 (patch) | |
tree | fd45650ebc66f17cda8e124c223674267d26490e | |
parent | b3a9ce706369d0d7800ccd3e46674ab32e0ab548 (diff) |
hevcdec: set the active SPS before calling get_format()
This way the SPS is available to the hwaccel init code.
-rw-r--r-- | libavcodec/hevcdec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index f6bbb7051e..664e4ac14b 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -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; |