hevcdec: do not set decoder-global SPS prematurely
authorAnton Khirnov <anton@khirnov.net>
Sun, 18 Dec 2016 21:06:32 +0000 (22:06 +0100)
committerAnton Khirnov <anton@khirnov.net>
Mon, 19 Dec 2016 07:07:15 +0000 (08:07 +0100)
commit373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a
tree24581be7e4b3670ca462d7de818088e2775fef5e
parent0fea8555ae25124c21f4c4f55a5fa76e9169aa03
hevcdec: do not set decoder-global SPS prematurely

It should only be set after the decoder state has been fully initialized
for using that SPS.
Fixes possible invalid reads on get_format() failure.

CC: libav-stable@libav.org
libavcodec/hevcdec.c