gifdec: return more meaningful error codes