avcodec/qsvdec: Fix null dereferences in the qsv decoder

This patch fixes the h264_qsv decoder issues mentioned
in https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=2962.

The patch may be tested by specifying h264_qsv as the decoder to ffplay
for an h264 encoded file.

	ffplay -vcodec h264_qsv foo.mts

Signed-off-by: Yuli Khodorkovskiy <ykhodo@gmail.com>
Push requested-by: Ivan Uskov
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
