gifdec: check that the last keyframe exists and has been successfully parsed.

Prevents inconsistent state and null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 46cb61819d867961e8f2052a8f13bcf2027d484f)

Conflicts:

	libavcodec/gifdec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
1 file changed