diff options
author | James Almer <jamrial@gmail.com> | 2017-11-11 02:31:55 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-11 02:31:55 +0300 |
commit | 7762942045a05170de8bbe9d707c2344b445907f (patch) | |
tree | 13106a295e78206d3d2caf1573a9dc2c7c1c0b1e /libavcodec/hevcdec.c | |
parent | 09100ccc14690a9d781f055642b5b880752ee636 (diff) | |
parent | 00fd914d4912322212e924c15f325cebf2fde8d3 (diff) |
Merge commit '00fd914d4912322212e924c15f325cebf2fde8d3'
* commit '00fd914d4912322212e924c15f325cebf2fde8d3':
hevcdec: set the active SPS before calling get_format()
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevcdec.c')
-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 675025b211..403a8cf454 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -503,13 +503,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; |